#include <bits/stdc++.h>

#define                 ll long long int
#define                 pii pair <int, int>
#define                 pb push_back
#define                 M 1000000007
#define                 umap unordered_map
#define                 uset unordered_set
#define                 endl "\n"
#define                 loop(i,x,n) for(ll i = x; i < n; i++)
#define                 rloop(i,x,n) for(ll i = n-1; i >= x ; i--)
#define                 SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define                 vi vector <ll>
#define                 all(x) x.begin(), x.end()
#define                 yes cout << "YES\n"
#define                 no cout << "NO\n"
#define                 f first
#define                 s second


using namespace std;



void seive(int N)
{
// move it up
    vi isprime(N , true);
    vi prime;
    vi SPF(N);
    vi primes;
// this block

    isprime[0] = isprime[1] = false ;

    for (ll i = 2; i < N ; i++)
    {
        if (isprime[i])
        {
            prime.push_back(i);
            SPF[i] = i;
        }
        for (ll j = 0;
                j < (int)prime.size() &&
                i * prime[j] < N && prime[j] <= SPF[i];
                j++)
        {
            isprime[i * prime[j]] = false;
            SPF[i * prime[j]] = prime[j] ;
        }
    }
    for (int i = 0; i < prime.size() && prime[i] <= N ; i++)
        primes.pb(prime[i]);
}

bool is_prime(ll n) {

    if (n == 1) {
        return false;
    }

    int i = 2;
    while (i * i <= n) {
        if (n % i == 0) {
            return false;
        }
        i += 1;
    }
    return true;
}

long long exponensiation(long long a, long long b) {
    a %= M;
    long long res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a % M;
        b >>= 1;
    }
    return res;
}
//____________________________________________________________________________________________

vector <ll> dic;
void pre() {
    ll x = 0;
    for (int i = 1; i < 1000000; i++) {
        x += i;
        dic.pb(x);
    }
}

void solve()
{
    ll x;
    cin >> x;
    ll ans = lower_bound(dic.begin(), dic.end(), x) - dic.begin() + 1;
    cout << ans << '\n';
}

//____________________________________________________________________________________________


int main() {

//____________________________________________________________________________________________
//#ifndef ONLINE_JUDGE
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
//#endif
//____________________________________________________________________________________________


    SPEED;
    pre();
    double T = 1;
    //cin >> T;
    while (T--) {
        solve();
    }
    return 0;

}
/*****************************
*  Author :: Πρασαννα Κ. Ροι *
*****************************/

/***********************************
* Unus pro omnibus, omnes pro uno  *
***********************************/
#include<bits/stdc++.h>
using namespace std;
using namespace std::chrono;

#define __AcHiLlEs ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int long long
#define span(a) begin(a), end(a)

template<typename t>
using vc = vector<t>;

int bSearch(int val) {
  int l = 0, r = 100000;
  while (r - l > 1) {
    int m = (l + r) >> 1;
    int sum = (m * (m + 1)) / 2;
    if (sum >= val) r = m;
    else l = m;
  }
  return r;
}

void solve() {
  int n;
  cin >> n;
  cout << bSearch(n) << "\n";
}

signed main() {
  // auto start = high_resolution_clock::now();
  __AcHiLlEs

  int t(1);
  // cin >> t;
  for (int i = 1; i <= t; /*cout << "Case " << i << ": ",*/ solve(), i++);
  // auto stop = high_resolution_clock::now();
  // double duration = duration_cast<microseconds>(stop - start).count();
  // cout << fixed << setprecision(4) << duration / 1000000 << "\n";  
  return 0;
}