#include<iostream> using namespace std; int main(){ int m,s=0; cin>>m; int n=1; while(s<=m){ s=s+n; n=n+1; } cout<<n-1; return 0; }