#include using namespace std; int main() { long long A; cin >> A; long long min_ = 1000000000; for (long long i = 2; i < 100; i++){ long long B = 1; long long count = 0; while (A > B){ B *= i; count++; } min_ = min(min_, count * i); } cout << min_ << endl; }