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