#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(long long i=0;i<n;i++)
#define P pair<ll,ll>
#define F first
#define S second
#define all(a) (a.begin(),a.end())
long long INF=1000000000000000000;
long long mod=1000000007;
int dp[1010][1010];
int main(void){
    ll x;cin>>x;
    ll com=0;ll ans;
    rep(i,200000){
        com+=i;
        if(com>=x){ans=i;break;}
    }
    cout<<ans;
}