#include <bits/stdc++.h>
#define ff first
#define ss second
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define endl '\n'

// n acho que eu seja bom, mas eu ja fui pior

using namespace std;

const int MAX = 1e5+7;
const int INF = 1e9+7;
const ll LLINF = 0x3f3f3f3f3f3f3f3fll;
const int MOD = 1000000007;
const ld EPS = 1e-8;
const ld PI = acos(-1);

ll solve(ll n) {
    return (n*(n+1)) / 2;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    
    ll n; cin >> n;
    for (ll it = 1; it <= 1e9; it++) {
        if (solve(it) >= n) {
            cout << it << endl;
            return 0;
        }
    }
    
    return 0;
}
///

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fo(i,a,b) for(int i=a;i<b;i++)
#define fodec(i,a,b) for(int i=a;i>b;i--)
#define sz(v) int(v.size())
#define len(s) s.length()
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int>>
#define vvb vector<vector<bool>>
#define vvll vector<vector<ll>>
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#define mp make_pair
#define piii pair<int,pair<int,int>>
#define all(x) x.begin(),x.end()
#define bit_cnt(x) __builtin_popcount(x)
#define fastio ios_base:: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define fileio freopen("input.txt","r",stdin); freopen("output.txt","w",stdout)
#define inf 1e9
#define cerr if(false)cerr
const int MOD = 1e9+7;

void solve(){

}

int main(){
    int n; cin>>n;
    int d=1;
    int tot=0;
    while(tot<n){
        tot+=d;
        d++;
    }
    cout<<d-1;
}
