#include <bits/stdc++.h>
using namespace std;
long long n, c0, c1;
long long cnk(long long n, long long k) {
  long long res = 1;
  for (int i = 1; i <= k; i++) res = res * (n - i + 1) / i;
  return res;
}
long long count(long long x) {
  long long res = 0;
  for (int j = 0; (1 << j) <= n; j++) {
    if (x < j * c1) break;
    long long l = (x - j * c1) / c0;
    res += cnk(j + l + 1, j + 1);
  }
  return res;
}
long long get_cost(long long x) {
  long long res = 0;
  for (int j = 0; (1 << j) <= n; j++) {
    if (x < j * c1) break;
    long long l = (x - j * c1) / c0;
    res += l * (l + 1) * cnk(j + l + 1, j) / (j + 2) * c0 +
           j * c1 * cnk(j + l + 1, j + 1);
  }
  return res;
}
int main() {
  cin >> n >> c0 >> c1;
  if (c0 == 0 || c1 == 0)
    printf("%lld\n", (c0 + c1) * (n - 1));
  else {
    if (c0 > c1) swap(c0, c1);
    n--;
    long long l = 1;
    long long r = 1;
    while (count(r) < n) r *= 2;
    while (l < r) {
      long long c = (l + r) / 2;
      if (count(c) < n)
        l = c + 1;
      else
        r = c;
    }
    long long res = (c0 + c1) * n;
    res += (n - count(r - 1)) * r;
    res += get_cost(r - 1);
    cout << res << endl;
  }
  return 0;
}
