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

const int Mxn = 1e5;
int a[Mxn], n;

void solve() {
	ll N;
	cin >> N;
	for (ll i = 1; i <= 100000; ++i) {
		if ((i * i + i) >= 2 * N) {
			cout << i ;
			return;
		}
	}
}

int main() {
	int t = 1;
	//cin >> t;
	while (t--) {
		solve();
	}
}
#include<bits/stdc++.h>
using namespace std;

#define int long long

#define test                int x;  cin>>x; while(x--)
#define fast                 ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

#define f(i,a,b)           for(int i = a; i < b; i++)
#define fe(i,a,b)          for(int i = a; i <= b; i++)

#define ALL(a)                      (a).begin(),(a).end()
#define RALL(a)                     (a).rbegin(), (a).rend()
#define SZ(a)                       int((a).size())

int32_t main(){
    int n;
    cin >> n;
    //cout << sqrt(n) << "\n";
    for(int i = 1,j = (int)sqrt(n); i <= (int)sqrt(n),j <= n; i++,j++){
        int sum = ((i*(i+1))/2);
        int sum1 = ((j*(j+1))/2);
        if(sum >= n){
            cout << i;
            break;
        }
        if(sum1 >= n){
            cout << j;
            break;
        }
    }
}