
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    ll s=0;
    for (int i = 1; ; ++i)
    {
    	s+=i;
    	if(s>=n){ cout<<i; break;}
    }
	return 0;
}
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>

#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long

using namespace std;

ll n,a;

int main(){
    cin >> n;
    a = 0;
    while(a*(a+1)/2 < n){
        a++;
    }
    cout << a << endl;

}