using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static long sumOfGroup(long k) { // Return the sum of the elements of the k'th group. long sum = 0; long val=0; val = (k * (k - 1)) + 1; for (long i = 0; i < k; i++) { sum = sum + val + (2 * i); } return sum; } static void Main(String[] args) { long k = Convert.ToInt32(Console.ReadLine()); long answer = sumOfGroup(k); Console.WriteLine(answer); } }