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 n = k; long ct = n*(n-1)/2; long first = 1 + (ct)*2; long sum = 0; for(long i = 0; i < k;i++ ){ sum = sum + first; first += 2; } // Return the sum of the elements of the k'th group. 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(); } }