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