#include <iostream>

using namespace std;
int main()
{
    int N;
    cin >> N;

    int num = 1;
    int i = 1;
    int count = 1;
    while(true){
        if(num >= N){
            cout << count << endl;
            break;
        }
        count++;
        num += count;
    }

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define loop(i, a, n) for (int i = a; i < n; i++)
#define loope(i, b, n) for (int i = b; i <= n; i++)
#define loopit(a) for (auto it = a.begin(); it != a.end(); it++)
#define ms(a, b) memset(a, b, sizeof(a))
#define pb(a) push_back(a)
#define MP make_pair
#define pi pair<int, int>
#define ff first
#define ss second
#define bloop(i, a, b) for (int i = a; i > b; i--)
#define bloope(i, a, b) for (int i = a; i >= b; i--)
#define PQ priority_queue<int> pq;
#define vi vector<int>
#define vii vector<vector<int>>
#define si set<int>
#define NO cout << "NO\n";
#define YES cout << "YES\n";
#define MPQ priority_queue<pi, vector<int>, greater<pi>> mpq;
#define io                                              \
    ios_base::sync_with_stdio(0);                       \
    cin.tie(NULL);                                      \
// #include < ext / pb_ds / assoc_container.hpp >       \
// #include <ext/pb_ds/tree_policy.hpp>                 \
// using namespace __gnu_pbds;                          \
// typedef tree<int, null_type, less<int>, rb_tree_tag, \
//         tree_order_statistics_node_update>           \
//         ordered_set;
ll ceil(ll a, ll b)
{
    return (a + b - 1) / b;
}

void solve()
{
    int n;cin>>n;
    int beg = 1,end = 1e5;
    while(beg<end){
        int mid = (beg+end)/2;
        ll ans = 1ll*mid*(mid+1)/2;
        if(ans>=n)end=mid;
        else beg = mid+1;
    }
    cout<<beg<<"\n";
}
int main()
{
    io;
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int test = 1, i = 0;
    // cin >> test;
    while (i++ != test)
    {
        // cout<<"Case #"<<i<<": ";
        solve();
    }
    return 0;
}
