#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
unsigned long long i, j, k, l, a = 0, q, f, kk, w = 1;
string s, s1[100], tes, s2;
vector<string> ss = { "I","V","X","L","C","D","M" };
vector<string>::iterator iit;
vector<int> mm = { 1,5,10,50,100,500,1000 };
cin >> i;
for (j = i; j>0; j=j-a)
{
a++;
}
cout << a << endl;
system("PAUSE");
return 0;
}