#include using namespace std; using ll=long long; int main() { ll N, C, V; cin >> C >> V >> N; if(N==1)cout << 0 << endl,exit(0); ll ret = 1LL << 61; for(ll X = 1;( 1LL << X )<= 2LL * N; X++) { ll a = pow(N + 1.0e-9, 1.0 / X); ll Y = (log(N) - X * log(a)) / (log(a + 1) - log(a)) + 1 - 1.0e-9; ll cost = X * C + (X * (a - 1) + Y) * V; if(ret > cost) ret = cost; } cout << ret << endl; return 0; }