#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) #define CLR(mat) memset(mat, 0, sizeof(mat)) typedef long long ll; int main() { int N, C, V; cin >> N >> C >> V; ll ans = 1e15; FOR(i,1,20) { ll cnt = (C + V) * i; ll nokori = N - pow(2, i); if(nokori > 0) { cnt += ((nokori + pow(2, i - 1) - 1) / pow(2, i - 1)) * V; } ans = min(ans, cnt); } cout << ans << endl; return 0; }