#include <bits/stdc++.h>
using ll = long long;
inline ll read() {
  ll data = 0, w = 1;
  char ch = getchar();
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') data = data * 10 + (ch ^ 48), ch = getchar();
  return data * w;
}
ll n, c0, c1, ans;
ll C(ll n, ll m) {
  if (n < 0 || m < 0 || n < m) return 0;
  if (n < (m << 1)) m = n - m;
  ll ans = 1;
  for (int i = n; i > n - m; i--) ans *= i;
  for (int i = 1; i <= m; i++) ans /= i;
  return ans;
}
int check(ll mid) {
  ll a = mid / c1, b = 0, sum = 0;
  for (int i = a; sum < n && i >= 0; i--)
    b = (mid - c1 * i) / c0, sum += C(i + b + 1, i + 1);
  return sum >= n;
}
int main() {
  n = read() - 1, c0 = read(), c1 = read();
  if (c0 > c1) std::swap(c0, c1);
  if (!c0) return printf("%lld\n", n * c1), 0;
  ll l = 0, r = c1 * 30, val = 0;
  while (l <= r) {
    ll mid = (l + r) >> 1;
    if (check(mid))
      val = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  ans += n * (c0 + c1), --val;
  ll a = val / c1, b = 0;
  for (int i = a; i >= 0; i--) {
    ll s = C(i + (b = (val - c1 * i) / c0) + 1, i + 1);
    n -= s;
    ans += (s * b - C(i + b + 1, i + 2)) * c0 + i * s * c1;
  }
  printf("%lld\n", ans + n * (val + 1));
  return 0;
}
