#include <iostream>
#include <fstream>
#include <cstdlib>
#include <bitset>
#include <map>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <algorithm>
#include <sstream>
#include <set>
#include <unordered_set>

using namespace std;

#define ll long long
#define ld long double
#define vecint vector<int>
#define vec2int vector<vector<int>>
#define vecll vector<long long>
#define vec2ll vector<vector<long long>>
#define vec3ll vector<vector<vector<long long>>>
#define vecdouble vector<double>
#define vecchar vector<char>
#define vecstr vector<string>
#define vec2str vector<vector<string>>
#define vecbool vector<bool>
#define vec2bool vector<vector<bool>>
#define pairll pair<ll,ll>
#define vecpairll vector<pair<long long,long long>>
#define vec2pairll vector<vector<pair<long long,long long>>>
#define vec3pairll vector<vector<vector<pair<long long,long long>>>>
#define forll(s,a,b) for(long long s = a;s < b;s++)
#define forllde(s,a) for(long long s = a;s > 0;s--)
#define forbit(s,a) for(int s = 0; s < (1 << a); s++)

#define sortLower(vec) sort(vec.begin(),vec.end())
#define sortGreater(vec,type) sort(vec.begin(),vec.end(),greater<type>())

const ll INF = 1000000000000;
const ld Pi = acos(-1.0);
const ll mod = 1000000007;
const ll mod9 = 998244353;
const ld EPS = 0.0000000001;

#define out_(s) cout << s << " "
#define out(s) cout << s << "\n"

class UnionFind
{
	vecll par;
public:
	UnionFind(ll n)
	{
		par.resize(n, -1);
	}

	ll root(ll pos)
	{
		if (par[pos] == -1) return pos;
		par[pos] = root(par[pos]);
		return par[pos];
	}

	void unite(ll u, ll v)
	{
		u = root(u); v = root(v);
		if (u == v) return;
		par[u] = v;
	}

	bool same(ll u, ll v)
	{
		if (root(u) == root(v)) return true;
		return false;
	}
};

ll gcd(ll a, ll b)
{
	if (min(a, b) == 0)
		return max(a, b);

	return gcd(min(a, b), max(a, b) % min(a, b));
}

template <typename T>
T lcm(T a, T b)
{
	T buf = gcd(a, b);

	return abs(a * b) / buf;
}

string toBaseNum(ll n, ll base)
{
	string s;

	while (n > 0)
	{
		if (base > 10)
		{
			if (n % base >= 10)
			{
				string buf;
				buf.push_back(n % base - 10 + 'A');
				s = buf + s;
			}
			else
			{
				s = to_string(n % base) + s;
			}
		}
		else
		{
			s = to_string(n % base) + s;
		}
		n /= base;
	}

	if (s.empty())
		s = "0";

	return s;
}

ll toDecNum(string n, ll base)
{
	ll num = 0;

	forll(i, 0, n.size())
	{
		ll buf = 0;
		buf = n[i] >= 'A' ? n[i] - 'A' + 10 : n[i] - '0';
		num += pow(base, n.size() - i - 1) * buf;
	}

	return num;
}

vecpairll primeFactorize(ll n)
{
	vecpairll buf;

	forll(i, 2, sqrt(n + 1))
	{
		if (n % i != 0)
			continue;

		long long ex = 0;

		while (n % i == 0)
		{
			++ex;
			n /= i;
		}

		buf.push_back({ i, ex });
	}

	if (n != 1) buf.push_back({ n, 1 });

	return buf;
}

bool isInField(pairll next, ll row, ll col)
{
	return (0 <= next.second && next.second < col) && (0 <= next.first && next.first < row);
}

//逆元((1÷b) mod p、bを掛けるとmod pで1となる数)を求める
ll modinv(ll a, ll m)
{
	ll b = m, u = 1, v = 0;

	while (b)
	{
		ll t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}

	u %= m;

	if (u < 0)
		u += m;

	return u;
}

ll Combination(ll n, ll r)
{
	ll num = 1;

	for (ll i = 1; i <= r; i++)
	{
		num = num * (n - i + 1) / i;
	}

	return num;
}

int main() {
	ll n, m, l, ans = 0;
	string s = "No";
	bool flag = false;

	cin >> n;

	ll count = 0;

	forll(i, 0, n)
	{
		count += i + 1;
		ans++;

		if (count >= n)
			break;
	}

	out(ans);
}
#include<bits/stdc++.h>
#define ll   long long
#define Fast  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define endl   '\n'
using namespace std;
ll a,b,c,d,e,x,y,n,k,m,z,sum,i,j;
#define mx 1000000000


int main()
{
   Fast
   cin>>n;
   i=1;
    while(1)
    {
       sum=sum+i;
       i++;
       k++;
       if(sum>=n)
       {
          cout<<k<<endl;
          break;
       }
    }





}

