#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: wengzihang
Language: C++
Result: Accepted
Time:8 ms
Memory:2072 kb
****************************************************************/