import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static BigInteger sumOfGroup(int k) { if(k == 1){ return BigInteger.valueOf(1); } // Return the sum of the elements of the k'th group. BigInteger sum = BigInteger.valueOf(0); BigInteger start = BigInteger.valueOf(k); start = start.multiply(BigInteger.valueOf(k-1)); start = start.add(BigInteger.valueOf(1)); for(int i = 0; i < k; i++){ sum = sum.add(start.add(BigInteger.valueOf(i * 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.toString()); in.close(); } }