import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long sumOfGroup(int k) { // Return the sum of the elements of the k'th group. // Return the sum of the elements of the k'th group. // group 1 1 elem // group k starts with the (1 + 2 + .. + (k-1)) long lo = (long)k * (k-1) + 1; // it has k element long hi = lo + 2 * (k - 1); return (lo + hi) * k / 2; } 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(); } }