#include <iostream>
using namespace std;
int main(){
int n; cin >> n;
int sum = 0;
int cnt = 1;
while(n >= cnt && n){
sum += cnt * cnt;
n -= cnt;
cnt ++ ;
}
if(n) sum += cnt * n;
cout << sum << endl;
return 0;
}