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

int main()
{
  int n;
  cin>>n;
  int m=0,i=0;
  while(m<n)
  {
    m+=i;
    i+=1;
  }
  cout<<i-1;
  return 0;
}

// Problem : B - Savings
// Contest : AtCoder - AtCoder Beginner Contest 206（Sponsored by Panasonic）
// URL : https://atcoder.jp/contests/abc206/tasks/abc206_b
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

// Delete the dynamically allocated memory

#include<bits/stdc++.h>
using namespace std;
 
#define ff              first
#define ss              second
#define pb              push_back
#define pr              pair<long long,long long>
#define mp(a,b)         make_pair(a,b)
#define vr              vector<long long>
#define mod1            1000000007
#define mod2            998244353
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define fill(a,b)       memset(a, b, sizeof(a))
#define mk(arr,n,type)  type *arr=new type[n];
#define ll              long long
#define ld	            long double
#define w(x)            int x; cin>>x; while(x--)

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll n;
	cin>>n;
	for(ll i=0;i<=n;i++){
		if((i*(i+1))/2>=n){
			cout<<i<<"\n";
			break;
		}
	}
	return 0;
}
	
	
	
	
	

