#include <bits/stdc++.h>
using namespace std;
const long long M = 1e7;
const long long MAX = 1e7;
long long dp[M + 2];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, x, y;
  cin >> n >> x >> y;
  dp[0] = 0;
  dp[1] = x;
  long long m = 3;
  for (long long i = 2; i <= M; i += 2) {
    dp[i] = min(dp[i - 2] + 2 * x, dp[i / 2] + y);
    for (long long j = m; j <= (i - 1); j += 2)
      dp[j] = min(dp[j - 1] + x, dp[j + 1] + x);
    m = i + 1;
  }
  cout << dp[n] << "\n";
}
