#include using namespace std; using ll = long long; using PII = std::pair; using PLL = std::pair; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) vector> donates; ll coin(int k) { ll a, b, n, l, m, r; l = m = r = 0; n = donates.size(); rep(i, n) { a = donates[i][0], b = donates[i][1]; if (a <= k && k <= b) { l += k - a; m += 1; r += b - k; } else if (b < k) l += b - a + 1; else if (a > k) r += b - a + 1; } return l+1; } int main() { #ifdef DEBUG cout << "DEBUG MODE" << endl; ifstream in("input.txt"); //for debug cin.rdbuf(in.rdbuf()); //for debug #endif int n, c, v, cv, costa, costb, p, ans; cin >> n >> c >> v; cv = c + v; ans = 1e9; costa = costb = 0; p = 1; n--; rep(i, 16) { n -= p; costa += cv; costb = costa + (n + p - 1) / p * v; ans = min(ans, costb); p *= 2; } cout << ans << endl; return 0; }