#include<bits/stdc++.h>
using namespace std;
int main(){

    int n;
    cin>>n;
    int sum = 2*n;
    int i=1;
    while(1){
        if(i*(i+1) >= sum){
            break;
        }
        i++;
    }
    cout<<i;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastIO ios_base::sync_with_stdio(false); cin.tie(0);
#define mod 1000000007

ll power(ll x, ll n) {
     ll ans = 1;
     while(n>0) {
         if(n&1){
             ans = (ans*x)%mod;
             n = n-1;
         }
         else {
            x = (x*x)%mod;
            n = n/2;
         }
    }
     return ans;
}

int main() 
{
     fastIO;
    ll n;
    cin>>n;
    ll sum = 0;
    int i = 1;
    while(sum < n) {
        sum += i;
        i++;
    }
    cout<<i-1<<endl;

}