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) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] m = new int[n]; for(int m_i=0; m_i < n; m_i++){ m[m_i] = in.nextInt(); } long sum=0l; int x=1; while((n-x)>0) { sum+=(n-x)*(n-x-1); sum+=1; x++; } System.out.println(sum); // your code goes here } }