using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static long sumOfGroup(int k) { int total = 0; for(int m=1;m<=k;m++) { total = total + m; } int[] PrimeArray = new int [total]; int index = 0; for (int i = 1;; i=i+2) { PrimeArray[index] = i; index++; if(index == total) { break; } } int StartArray = total - k; int EndArray = total - 1; int SumTotal = 0; //Console.Write("\t Total " + total); //Console.Write("\t StartArray " + StartArray); //Console.Write("\t EndArray " + EndArray); for(int i=StartArray;i<=EndArray;i++) { //Console.Write("\t tte" + PrimeArray[1]); //Console.Write("\t" + PrimeArray[i]); SumTotal = SumTotal + PrimeArray[i]; } return SumTotal; // Return the sum of the elements of the k'th group. } static void Main(String[] args) { int k = Convert.ToInt32(Console.ReadLine()); long answer = sumOfGroup(k); Console.WriteLine(answer); } }