#include <bits/stdc++.h>
using namespace std;
int n;
long long c0, c1;
long long f[40];
long double chsfp(long long a, int b) {
  if (a < b) return 0;
  long double lg = 0;
  for (int i = (0); i < (b); i++)
    lg += log((long double)a - i) - log((long double)i + 1);
  return exp(lg);
}
long long gn(long long x) {
  for (int i = (0); i < (40); i++) {
    long long nx = x - i * c1;
    long long n0 = nx >= 0 ? nx / c0 : -1;
    f[i] = n0;
  }
  long double fpres = 0;
  for (int i = (1); i < (40); i++) {
    fpres += chsfp(f[i] + i, i);
    fpres += chsfp(f[i - 1] + i, i) - chsfp(f[i] + i, i);
  }
  if (fpres > 1e10)
    return 1e10;
  else
    return (long long)(fpres + 0.5);
}
long long stk[10000000];
int ss;
int main() {
  scanf("%d %lld %lld", &n, &c0, &c1);
  if (c1 < c0) swap(c1, c0);
  if (c0 == 0) {
    printf("%lld\n", (n - 1) * c1);
    return 0;
  }
  long long sx = 0, ex = 1e10, bx = 1e10;
  while (sx <= ex) {
    long long mx = (sx + ex) / 2;
    long long m = gn(mx);
    if (m >= n) {
      ex = mx - 1;
      bx = mx;
    } else {
      sx = mx + 1;
    }
  }
  stk[ss++] = 0;
  long long res = 0;
  int nmtk = 0;
  while (ss) {
    long long f = stk[--ss];
    long long a = f + c0, b = f + c1;
    if (a < bx)
      stk[ss++] = a;
    else {
      res += a;
      nmtk++;
    }
    if (b < bx)
      stk[ss++] = b;
    else {
      res += b;
      nmtk++;
    }
  }
  while (nmtk < n) {
    res -= bx;
    res += bx + c0;
    res += bx + c1;
    nmtk++;
  }
  printf("%lld\n", res);
}
