#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int i=1,n,s=0;
    cin>>n;
    while(s<n)
    {
    s+=i;
    i++;
    }
  cout<<i-1<<endl;
  return 0;
}

#include <math.h>
#include <bits/stdc++.h>
using namespace std;
#define rep(i, l, n) for (int i = (l); i < (n); i++)
#define max(p, q) ((p) > (q) ? (p) : (q))
#define min(p, q) ((p) < (q) ? (p) : (q))
using ll = long long;
using P = pair<int, int>;
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T> >;
const ll INF = 1e18 + 1;
const ll mod = 1000000007;
int main()
{
  ll n;
  cin >> n;
  ll ans = 1;
  while(2*n>ans*(ans+1))
    ans++;
  cout << ans << endl;
  return 0;
}
