import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int i,sum = 1,sum1 = 0; static long sumOfGroup(int k) { for(int i = 0; i < k + 2; i++){ sum += 2; if(i >= k-1){ sum1 += sum; } } return sum1; } 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(); } }