#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=0,s=0,m;
cin>>m;
while(s<=m)
{
++n;
s+=n;
}
cout<<n;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=0,s=0,m;
cin>>m;
while(s<=m)
{
++n;
s+=n;
}
cout<<n;
return 0;
}