#include<bits/stdc++.h>
#include<algorithm>
#define int long long
using namespace std;
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	//MessageBox(GetForegroundWindow(),"标题","内容",MB_YESNO);
	int n,i;
	cin>>n;
	int sum=0;
	for(i=1;i<=n;i++){
		sum+=i;
		if(sum>=n){
			break;
		}
	}
	cout<<i;
	return 0;
}

///131111129..........
#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pi acos(-1)
#define pb push_back
#define mp make_pair
#define rip() for(ll i=0;i<n;i++)
#define rip1() for(ll i=n-1;i>=0;i--)
#define cin(a) cin>>a
#define cout(a) cout<<a
#define nl '\n'

///Chess moves.........
// int dx[] = {+0, +0, -1, +1}; ///Up-down, Left-Right
 //int dy[] = {+1, -1, +0, +0};
// int dx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's Move
// int dy[] = {-1,+1,+0,+0,+1,+1,-1,-1};
// int dx[] = {-2, -2, -1, -1,  1,  1,  2,  2}; ///Knight's Move
// int dy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

ll gcd(ll a, ll b){ while (b){ a %= b; swap(a, b);} return a;}
ll lcm(ll a, ll b){ return (a/gcd(a, b)*b);}

ll bigmod(ll a,ll b, ll mod)
{
    b%=(mod-1);
    ll result=1ll;
    while(b>0ll){
        if(b&1ll) result=result*a%mod;
        a=a*a%mod;
        b>>=1ll;
    }
    return result;
}


ll inverse(ll a, ll M){
	if(gcd(a, M)==1) return bigmod(a, M-2, M) % M;
	return 1;
}
ll ncr(ll a, ll b, ll mod){ ll x = max(a-b, b), ans=1; for(ll K=a, L=1; K>=x+1; K--, L++){ ans = ans * K % mod; ans = ans * inverse(L, mod) % mod;} return ans;}

ll prime(ll n)
{
    ll cnt=0;
    while(n%2==0){
        n/=2;
        cnt++;
    }
    for(ll i=3;i*i<=n;i+=2){
        if(n%i==0){
            while(n%i==0){
                n/=i;
                cnt++;
            }
        }
    }
    if(n>1) cnt++;
    return cnt;
}

ll fact(ll n,ll mod)
{
    ll res=1;
    for(ll i=2;i<=n;i++){
        res=(res%mod*i%mod)%mod;
    }
    return res;
}

void urmi()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

int main()
{
    urmi();
    /*#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif*/
    ll t=1;
    //cin>>t;
    while(t--){
        ll n,s=0,c;
        cin>>n;
        for(ll i=1;;i++){
            s+=i;
            if(s>=n){
                cout<<i<<endl;
                return 0;
            }
        }
    }
}