using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Numerics; class Solution { static BigInteger sumOfGroup(BigInteger k) { BigInteger n = ((k) * (k - 1)) + 1; BigInteger x = (k) * (k - 1); return (n * k) + x; } static void Main(String[] args) { int k = Convert.ToInt32(Console.ReadLine()); BigInteger answer = sumOfGroup(k); Console.WriteLine(answer); } }