#include<bits/stdc++.h>
using namespace std;
int main() {
    int a=0,b,i=1;
    cin>>b;
    while(i<=b){
        a=a+i*i;
        i++;
    }
    cout<<a;
}
/**************************************************************
	Problem: 1054
	User: wengsihan
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/