#include<bits/stdc++.h> using namespace std; int main(){ int n=1,k,sn=1; cin>>k; for(int i=2;sn<=k;i++){ n++; sn=sn*n; } cout<<n; }