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