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