#include<iostream> #include<cmath> using namespace std; int main(){ int i,j=0,c; cin>>i; while(i>=c){ c+=j; j+=1; } cout<<j-1; }