#include <bits/stdc++.h>
using namespace std;
#define ll                  long long 
#define pb                  push_back
#define ppb                 pop_back
#define um                  unordered_map
#define MOD                 1000000007
#define rep(i,s,e)          for(int i=s; i<e; i++)
#define rrep(i,s,e)         for(int i=e-1; i>=s; i--)
#define all(x)              (x).begin(),(x).end()
#define uniq(v)             (v).erase(unique(all(v)),(v).end())
#define sz(x)               (int)((x).size())
#define ff                  first
#define ss                  second
#define mp                  make_pair
#define vi                  vector<int>
#define vpii                vector<pair<int,int>> 
#define pii                 pair<int,int>
#define mem1(a)             memset(a,-1,sizeof(a))
#define mem0(a)             memset(a,0,sizeof(a))
#define google(test_no)     cout<<"Case #"<<test_no<<": ";
#define DEBUG true
#define deb(x) \
    if (DEBUG) \
        cerr << #x << " " << x << endl;  
#define debarr(arrayName, s, n)          \
    if (DEBUG)                           \
    {                                    \
        cout << #arrayName << endl;      \
        for (ll i = s; i < n; i++)       \
            cout << arrayName[i] << " "; \
        cout << endl;                    \
    }
#define debarr2d(arrayName,s, n, m)             \
    if (DEBUG)                                  \
    {                                           \
        cout << #arrayName << endl;             \
        for (ll i = s; i < n; i++){             \
            for(ll j = s; j < m; j++){          \
                cout << arrayName[i][j] << " "; \
            }                                   \
         cout << endl;                          \
        }                                       \
    }
#define debv(vec)             \
    if (DEBUG)                \
    {                         \
        cout << #vec << " ";  \
        for (auto x : vec)    \
            cout << x << " "; \
        cout << endl;         \
    }
#define tc            \
    ll test_case;     \
    cin >> test_case; \
    while (test_case--) 

//********************************************************************************************

void solve(int test){

    ll n;
    cin>>n;

    int i=1;
    while((ll)(i*(i+1))/2 < n){
        i++;
    }

    cout << i;
}

int main(){ 

    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif

        
    int t = 1;
    // cin>>t;
    for(int i=1; i<=t; i++){
        solve(i);
    }

 return 0;           
}



#include<bits/stdc++.h>
typedef long long ll;
#define V(a) vector<a>
#define P(a,b) pair<a,b>
#define A(a) set<a>
#define M(a,b) map<a,b>
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define in insert
#define bp __builtin_popcount
#define ppb pop_back
#define FOR(a,b,c) for(ll(a) = b; a < c; a++)
#define FORN(a,b,c) for(ll(a) = b; a <= c; a++)
#define FOREV(a,b,c) for(ll(a)=b; a > c; a--)
#define FOREVN(a,b,c) for(ll(a)=b; a >= c; a--)
#define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
using namespace std;

bool cprime(int x)
{
    if (x == 1)
        return false;
    if (x <= 3)
        return true;
    if (x % 2 == 0 || x % 3 == 0)
        return false;
    for (int i = 5; i <= sqrt(x); i += 6)
        if (x % i == 0 || x % (i + 2) == 0)
            return false;
    return true;
}

bool cpalin(string s)
{
    int n = s.length(), l;
    if (n == 1)
        return true;
    if (n % 2 == 0)
        l = n / 2 - 1;
    else
        l = (n - 1) / 2 - 1;
    for (int i = 0; i <= l; i++)
        if (s[i] != s[n - i - 1])
            return false;
    return true;
}
void sieveOfEratosthenes(int n)
{
    bool arr[n + 1];
    FOR(i, 0, n + 1)
    arr[i] = true;
    for (int i = 2; i * i <= n; i++)
    {
        if (arr[i] == true)
        {
            for (int j = i * i ; j <= n; j += i)
            {
                if (arr[j] == true)
                    arr[j] = false;
            }
        }
    }
}

ll ndivs(ll n)
{
    int N = 1000;
    bool arr[N];
    FOR(i, 0, N)
    arr[i] = true;
    for (int i = 2; i * i <= N; i++)
    {
        if (arr[i] == true)
        {
            for (int j = i * i ; j <= N; j += i)
            {
                if (arr[j] == true)
                    arr[j] = false;
            }
        }
    }

    ll p = 1;
    FOR(i, 2, N)
    {
        if (arr[i] == true && n % i == 0)
        {
            ll m = 0; ll cp = n;
            while (cp % i == 0)
            {
                cp /= i;
                m++;
            }
            p *= (m + 1);
        }
    }
    return p;
}
bool compare( ll a,  ll b) // false return swap
{
    return a > b;
}


ll power( ll a, ll b)
{
    ll p = 1;
    ll N = 1e9+7;
    while (b > 0)
    {
        if (b & 1)
            p = (p%N * a%N)%N;
        a = (a%N*a%N)%N;
        b >>= 1;
    }
    return p;
}

string dtobin(ll n)
{
    string s;
    while (n)
    {
        s = to_string((n % 2)) + s;
        n /= 2;
    }
    return s;
}

ll bintod(string s)
{
    ll n = 0;
    FOR(i, 0, s.length())
    if (s[i] == '0')
        continue;
    else
        n += pow(2, (s.length() - 1 - i));
    return n;
}

ll sdigs(ll n)
{
    int s = 0;
    while (n)
    {
        s += n % 10;
        n /= 10;
    }
    return s;
}

ll fact(ll p)
{
    int x = 1;
    FORN(i, 1, p)
    x *= i;

    return x;
}
ll ncr(ll n , ll r)
{
    ll ans = (fact(n) ) / (fact(r) * fact(n - r));
    return ans;
}

ll __lcm(ll a, ll b)
{
    ll g = __gcd(a,b);
    return (a*b)/g;
}
int main() {

#ifndef ONLINE_JUDGE
    freopen("Input.txt", "r", stdin);
    freopen("Output.txt", "w", stdout);
#endif
    
   ll n;
   cin >> n;
   ll c = 0;
   while(c*(c+1)/2<n)
    c++;
cout << c;
    return 0;
}



