// //public class Solution { // // static BigInteger sumOfGroup(long k) { // BigInteger start = BigInteger.valueOf(k * (k - 1) + 1); // BigInteger sum = new BigInteger("0"); // // int x = k; // // while ((x--) != 0) { // sum = sum.add(start); // // start = start.add(BigInteger.valueOf(2)); // } // // return sum; // } // // public static void main(String[] args) { // Scanner in = new Scanner(System.in); // int k = in.nextInt(); // BigInteger answer = sumOfGroup(k); // System.out.println(answer); // in.close(); // } //} import java.util.Scanner; public class Solution { static long sumOfGroup(long k) { long start = k * (k - 1) + 1; long sum = 0; long x = k; while ((x--) != 0) { sum += start; start += 2; } return sum; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int k = in.nextInt(); long answer = sumOfGroup(k); System.out.println(answer); in.close(); } }