#include<bits/stdc++.h> using namespace std; int main(){ int n=1,m,s=1; cin>>m; while(s<=m){ n++; s=s*n; } cout<<n; return 0; }