import java.util.Scanner;
public class ghj
{
public static void main(String[] args )
{
Scanner scanner = new Scanner(System.in);
int number = scanner.nextInt();
Scanner nb = new Scanner(System.in);
int number2 =scanner.nextInt();
int sum=0;
for(int i=1;i<number+1;i++)
{
sum=sum+i*i;
}
System.out.print(sum);
}
}