#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
#define flash ios_base::sync_with_stdio(0);cin.tie(0);
#define ll long long
#define ndl '\n'
void solve()
{
   ll n;cin>>n;
   cout<<ceil((-1+sqrtl(1+8*n))/2)<<ndl;
}
int main()
{    
    auto starttime = high_resolution_clock::now();
    flash
    solve();
    auto endtime = high_resolution_clock::now();
    double duration = duration_cast<microseconds>(endtime - starttime).count();
    duration/=1000000;
    cerr<<"Time Taken : "<<fixed<<setprecision(6)<<duration<<" secs"<<'\n';
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
	int cur, n, i;
	cin >> n ;
	cur = 0;	
  	i = 1 ;
  	while(i<=n){
      cur += i ; 
      if(cur>=n) break ; 
    	++i ;}
	cout << i ;
	return 0;
}