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