import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { // write your code here Scanner scanner = new Scanner(System.in); long k = scanner.nextLong(); scanner.close(); long solution = solve(k); System.out.println(solution); } public static long solve(long k) { long a = k * (k-1) + 1; long b = k * (k+1) - 1; long sum = (a + b) * k /2; return sum; } }