#define nl                  "\n"
#define ll                  long long
#define ull                 unsigned long long
#define pb                  push_back
#define SIZE(a)             (int)a.size()
#define SORT(v)             sort(v.begin(),v.end())
#define RSORT(v)            sort(v.rbegin(),v.rend())
#define REV(v)              reverse(v.begin(),v.end())
#define ff                  first
#define ss                  second
#define sq(a)               ((a)*(a))
#define For(i,a,b)          for(i=a;i<=b;i++)
#define Rof(i,a,b)          for(i=a;i>=b;i--)
#define Rep(i,b)            for(i=0;i<b;i++)
#define MOD                 1000000007
#define PI                  acos(-1.0)
#define eps                 1e-9
#define Linf                2e18
#define inf                 1<<30
#define MX5                 100005
#define MX6                 1000006
#define MX3                 1005
#define GCD(a,b)            __gcd(a,b)
#define Abs(a)              abs(a)
#define input(a,b)          scanf("%lld%lld",&a,&b)
#define in1(a)              scanf("%lld",&a)
#define output(a)           printf("%lld\n",a);
#define mem(a)              memset(a,-1,sizeof(a)) // complexity O(n)
#define clr(a)              memset(a,0,sizeof (a))
#define mk                  make_pair
#define pLL                 pair<ll,ll>
#define invcos(a)           (acos(a)*(180/3.14159265))
#define rtan(a)             (tan(a*3.14159265/180.0))
#define pip                 printf("pip")
#define Case(x)             printf("Case %lld: ",x)
#define timelimit           1.0*clock()/CLOCKS_PER_SEC
#define pc_one              __builtin_popcount
#define pcl_one             __builtin_popcountl
#define pcll_one            __builtin_popcountll
#define parity              __builtin_parity
#define parityl             __builtin_parityl
#define parityll            __builtin_parityll
#define infile              freopen("input.txt","r",stdin)
#define outfile             freopen("output.txt","w",stdout)
#define debug(x)            cerr << #x << " is " << x << endl
#define fast                ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
#define minheap             priority_queue<int, vector<int>, greater<int> >
//const ll Linf=2e18;
///4direction ->        int del_x[]={-1,0,1,0},del_y[]={0,1,0,-1};
///8direction ->        int del_x[]={-1,0,1,0,1,-1,-1,1},del_y[]={0,1,0,-1,-1,-1,1,1};


#include <bits/stdc++.h>
/*#include <iomanip>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
using namespace std;
/*using namespace __gnu_pbds;

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
*/
ll find_lcm(ll a, ll b) { return ((a * b) / __gcd(a, b));}
ll bigmod(ll n, ll p) {if (p == 0) return 1; if (p == 1)return (n + MOD) % MOD; if (p % 2)return (bigmod(n, p - 1) * n + MOD) % MOD; else {ll x = bigmod(n, p / 2); return (x * x + MOD) % MOD;}}
ll modinverse(ll n) {return bigmod(n, MOD - 2) % MOD;}
bool check_2s_power(ll a) {return (pcll_one(a) == 1 ? true : false);}
ll check_Bit(ll n, ll k) { if (n & (1LL << k)) return true; return false; }
ll setBit(ll n, ll k) { return (n | (1LL << k)); }
ll clearBit(ll n, ll k) { return (n & (~(1LL << k))); }
ll toggleBit(ll n, ll k) { return (n ^ (1LL << k)); }

/*----------------------Graph Moves----------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*------------------------------------------------*/
int main()
{
     ll n,sum=0,i;
     in1(n);
     for(i=1;;i++)
     {
         sum=(i*(i+1))/2;
         if(sum>=n)
         {
             output(i);
             return 0;
         }
     }
}
#include "bits/stdc++.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
using namespace std; 

#define ll long long
#define rep(i, b) for (ll i = 0; i < b; i++)
#define fr(i ,a, b) for (ll i = a; i < b; i++)
#define rev(i, b) for (ll i = b-1; i >=0 ; i--)
#define in(a, n) rep(i, n) cin >> a[i];
#define outp(a) cout << a << endl;
#define out(a, n) rep(i, n) cout << a[i] << " ";
#define MIN -1e9
#define MAX 1e9
#define PI acos(-1)
#define inp(a) ll a; cin>>a;
#define endl "\n"
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define vl vector<ll>
#define ff first
#define ss second
#define sz(x) ((ll)(x).size())
#define boo(x) ((x==0)?cout << "NO" << endl; : cout << "YES" << endl;)

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<vi> vvi;
typedef unsigned long long ull;
typedef long double lld;

//=====================================================================/
//debug zone

// #ifndef ONLINE_JUDGE
// #define debug(x) cerr << #x <<" "; _print(x); cerr << endl;
// #else
// #define debug(x)
// #endif

// void _print(ll t) {cerr << t;}
// void _print(int t) {cerr << t;}
// void _print(string t) {cerr << t;}
// void _print(char t) {cerr << t;}
// void _print(lld t) {cerr << t;}
// void _print(double t) {cerr << t;}
// void _print(ull t) {cerr << t;}

// template <class T, class V> void _print(pair <T, V> p);
// template <class T> void _print(vector <T> v);
// template <class T> void _print(set <T> v);
// template <class T, class V> void _print(map <T, V> v);
// template <class T> void _print(multiset <T> v);
// template <class T, class V> void _print(pair <T, V> p) {cerr << "{"; _print(p.ff); cerr << ","; _print(p.ss); cerr << "}";}
// template <class T> void _print(vector <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// template <class T> void _print(set <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// template <class T> void _print(multiset <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// template <class T, class V> void _print(map <T, V> v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";}

//=====================================================================/
//Available Functions :

//1. binpow(binpow)	 2. string to int and int to string (stll)	 3. no of coprime nos before it(coprime)
//=====================================================================/

void solve(){

    double a;
    cin >> a;
    double p=sqrt(a);
    if(a==2||a==1){
        cout << "1" << endl;
        return;
    }
    fr(i,(int)p-1,a){
        if(((i*(i+1))/2)>=a){
            cout << i << endl;
            return;
        }
    }



    return;
}

int main(){

#ifndef ONLINE_JUDGE
    freopen("Error.txt", "w", stderr);
#endif
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    ll tt = 1;
    // cin >> tt;
    while(tt--)
        solve();
    return 0;
}