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