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 s = ((k-1)*k)/2; int sum =0; int j =0; int o = 0; for(int i=1 ; i<(2*s) ;i++) { if(i%2!=0) { j = i+2; } } sum = ((k)*((2*j)+((k-1)*2)))/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(); } }