#include<bits/stdc++.h> using namespace std; int n,sum,day,i=1; int main(){ cin>>n; while(day!=n){ for(int j=1;j<=i;j++){ sum+=i; day++; if(day==n) break; } i++; } cout<<sum<<endl; return 0; }