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