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