import java.util.Scanner; public class Solution { static long sumOfGroup(int k) { // Return the sum of the elements of the k'th group. long longk = (long) k; long constant = longk * (longk - 1); long begin = constant + 1; return (begin * longk) + constant; } 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(); } }