#include <iostream>
using namespace std;
unsigned long long find_result(unsigned long long S)
{
unsigned long long result = 0, temp = 0;
unsigned long long i = 1;
while (1)
{
temp = temp + i;
result++;
if (temp > S)
{
result -= 1;
break;
}
else
{
;
}
i++;
}
return result;
}
int main(void)
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
unsigned long long S;
cin >> S;
cout << find_result(S) << "\n";
return 0;
}