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