#include<bits/stdc++.h>
using namespace std;
int main(){
int n,h;
cin>>n;
h=n*(n+1)*(2*n+1)/6;
cout<<h<<endl;
return 0;
}
/**************************************************************
Problem: 1054
User: HUANGYIBO
Language: C++
Result: Accepted
Time:7 ms
Memory:2072 kb
****************************************************************/