using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static long sumOfGroup(int k) { var seed = (long)k * (k - 1) + 1; return Enumerable.Repeat(seed, k) .Select((n, i) => n + i * 2) .Sum(); } static void Main(String[] args) { int k = Convert.ToInt32(Console.ReadLine()); long answer = sumOfGroup(k); Console.WriteLine(answer); } }