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