#include <iostream>
using namespace std;
int main()
{
int K;
cin >> K;
int totalcoin =0;
int day =0;
int stage=1;
while( day + stage <= K )
{
totalcoin += stage*stage;
day += stage;
stage++;
}
int res= K - day ; // 剩下不足一个完整阶段的天数
totalcoin = totalcoin + res * stage;
cout << totalcoin << endl;
return 0;
}
金币 357