#include using namespace std; int main(){ long long N; cin >> N; long long ok = 0,ng = 100000; while(ng-ok>1){ long long mid = (ok+ng)/2; if(mid*(mid+1)/2>=N){ ng=mid; } else{ ok=mid; } } cout<