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