import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long sumOfGroup(int x) { // Return the sum of the elements of the k'th group. Integer y = x; Long k = new Long(y); long s; if (k % 2 == 0) { s = (k/2) * (k-1); } else { s = k * ((k-1)/2); } long a = 2*(s+1) - 1; long ans = (k*(2*a + (k-1)*2))/2; return ans; } 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(); } }