#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int s=1,w=1;; long long sum=0; for(int i=1;i<=n;i++){ while(s--){ if(i<=n){ sum+=w; i++; } else{ cout<<sum; return 0; } } w++; s=w; i--; } cout<<sum; return 0; }