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