#include using namespace std; using ll=long long; using ull=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main(){ ll N; cin>>N; ll l=0, r=80000; while(r-l>1){ ll m=(l+r)/2; if(m*(m+1)/2>=N) r=m; else l=m; } cout<