#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
#define FORA(i,I) for(const auto& i:I)
#define ALL(x) x.begin(), x.end();
#define SIZE(x) ll(x.size())
#define CHMIN(x,y) x = min(x, (y))
#define CHMAX(x,y) x = max(x, (y))
#define YES(b) cout << ((b) ? "Yes" : "No") << endl


int main() {
    int n, i = 1, save = 0;
    cin >> n;
    while (save < n) {
        save +=i;
        i++;
    }
    cout << --i << endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
    int n;
    int sum=0;
    cin >> n;
    for(int i=1; ;i++){
        if(((i*i+i)/2)>= n){
            cout << i<<endl;
            break;
        }
    }
}
