#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool cmin(T& a, const T& b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool cmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
int read() {
  int x = 0, f = 1;
  char ch;
  for (ch = getchar(); !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); x = x * 10 + ch - '0', ch = getchar())
    ;
  return x * f;
}
int main() {
  long long n, c0, c1;
  cin >> n >> c0 >> c1;
  if (!c0 || !c1) return printf("%lld\n", (c0 + c1) * (n - 1)), 0;
  map<long long, long long> F;
  for (F[0] = 1, --n; n > 0;) {
    pair<long long, long long> cur = *F.begin();
    if (cur.second <= n) {
      F.erase(F.begin());
      F[cur.first + c0] += cur.second;
      F[cur.first + c1] += cur.second;
    } else {
      F[cur.first] -= n;
      F[cur.first + c0] += n;
      F[cur.first + c1] += n;
    }
    n -= cur.second;
  }
  long long ans = 0;
  for (auto x : F) ans += x.first * x.second;
  cout << ans << endl;
  return 0;
}
