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