#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <cmath>

using namespace std;


//-------------------------------------------------------//
#define fast() 	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define MOD 1000000007
#define INF 1e18
#define endl '\n'
#define pb push_back
#define mp make_pair
#define PI 3.141592653589793238462
#define sz(x) ((int)(x).size())
#define all(x)	(x).begin(), (x).end()
#define rep(iter, from, to, increment)	for(iter = (from); iter<(to); iter+=(increment))

typedef long long ll;
typedef unsigned long long ull;
typedef long double lld; 


bool revsort(ll a, ll b) {return a>b;}
void swap(int &x, int &y) {int temp = x; x = y; y = temp;}
vector<ll> sieve(ll n){ int* arr = new int[n+1](); vector<ll> vect; for(int i = 2;i<=n; i++) if(arr[i]==0){ vect.push_back(i); for(int j = 2*i;j<=n;j+=i) arr[j] = 1;}return vect;}



void solveA(){
	float N;
	cin>>N;
	N *= 1.08;
	int out = N;
	if( out > 206) cout<<":("<<endl;
	else {
		if (out == 206) cout<<"so-so"<<endl;
		else cout<<"Yay!"<<endl;
	}
}

void solveB(){
	ll n;
	cin>>n;
	
	ll out = round(sqrt(2*n));
	cout<<out<<endl;

}
int main(){
	
	fast()

	//int T;
//	cin>>T;
//	while(T--)
		solveB();

}

#include<bits/stdc++.h>
using namespace std;
int main()
{   
    int n;
    cin>>n;
    n*=2;
    int res = sqrt(n);
    while(res*(res+1)<n){
        res++;
    }
    cout<<res<<endl;
    return 0;
}