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 pos = (k * (k - 1)) / 2; long f = (2 * (pos + 1)) - 1; long sum = f; k--; while(k-->0){ f += 2; sum += f; } return sum; } static void Main(String[] args) { long k = Convert.ToInt64(Console.ReadLine()); long answer = sumOfGroup(k); Console.WriteLine(answer); } }