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