#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int main(){ ll a; cin >> a; ll res = pow(10,18); for(int i = 1;i <= 60;i++){ double now = 1 / i; double ruto = pow(a,now); ll rutoll = (ll)ruto; if(ruto != (double)rutoll)rutoll++; res = min(res,i * rutoll); } cout << res << endl; }