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 first = (k - 1) * (k) / 2; long start = (2*first) - 1 + 2; long sum = start; long next = 0; for(int i = 1; i < k; ++i) { next = start + 2; sum += next; start = next; } return sum; } static void Main(String[] args) { long k = Convert.ToInt64(Console.ReadLine()); long answer = sumOfGroup(k); Console.WriteLine(answer); Console.Read(); } }