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 next = (k - 1) * k / 2; //Console.WriteLine(next); long cur = 2 * next + 1; //Console.WriteLine(cur); long sum = k * (cur + k - 1); return sum; } static void Main(String[] args) { long k = Convert.ToInt64(Console.ReadLine()); long answer = sumOfGroup(k); Console.WriteLine(answer); } }