#include #define ll long long #define fi first #define se second using namespace std; ll n; inline bool check(ll m){ if(m*(m+1)/2>n){ return 1; } return 0; } int main(){ cin>>n; ll ok=1,ng=2*(ll)1e9; while(ng-ok>1){ ll mid=(ok+ng)/2; //cerr<