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

int main(){
  int N;
  cin >> N;
  int i = 1;
  int ans = 0;
  
  while(ans < N){
    ans += i;
    i++;
  }
  cout << i - 1;
}
#include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll i,j,k,m,n,t;
    vector<int>a;
    a.push_back(0);
    for(i=1;i<=50000;i++)
    {
        a.push_back((i*(i+1))/2);
    }
    cin>>n;
    auto low1 = std::lower_bound(a.begin(), a.end(), n);
    cout<<(low1 - a.begin())<<endl;
    return 0;
}

