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