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