import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long sumOfGroup(long k) { // Return the sum of the elements of the k'th group. int groupLastNumber = 0; int c=1; for(int i=1; i<=k; i++){ //calculate the sum of numbers till k - it will give us the last number in the group we want groupLastNumber +=i; } //the group of numbers array int[] group = new int[groupLastNumber]; int last =0; while(c<=k){ last= (last + (2*groupLastNumber - 1)) -2; c++; } return last; } public static void main(String[] args) { Scanner in = new Scanner(System.in); long k = in.nextInt(); long answer = sumOfGroup(k); System.out.println(answer); in.close(); } }