import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long sumOfGroup(int k) { int strtNum = (((k*(k+1))/2)-k)+4; //System.out.println("Start num is "+strtNum); int sum =0; for(int i = 0; i < k; i++){ sum += strtNum+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(); } }