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

int main() {
    int n;
    cin >> n;

    int x = 1;
    while (x * (x + 1) < n * 2) {
        x++;

    }
    cout << x << "\n";
}
#include <algorithm>
#include <bits/stdc++.h>
#include <sys/ucontext.h>
using namespace std;
using ll = long long;
#define rep(j ,i, n) for (int i = j; i < (int)(n); i++)

int main(){
    ll a = 1;
    ll n;
    cin>>n;
    rep(0,i,10000000){
        ll c = i * (i+1) / 2;
        if(c >= n){
            cout<<i<<endl;
            break;
        }
    }

}