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