#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const long long oo = 1 << 30;
const long long loo = 1ll << 62;
const long long MAXN = 600005;
const long long INF = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
set<pair<long long, long long> > Set;
long long n, c0, c1, num, ans;
void add(long long x, long long y) {
  set<pair<long long, long long> >::iterator it =
      Set.lower_bound(make_pair(x, 0));
  if (it != Set.end() && (*it).first == x) y += (*it).second, Set.erase(it);
  Set.insert(make_pair(x, y));
}
signed main() {
  n = read(), c0 = read(), c1 = read();
  if (c0 > c1) swap(c0, c1);
  if (!c1) {
    puts("0");
    return 0;
  }
  if (!c0) {
    printf("%lld\n", 1ll * (n - 1) * c1);
    return 0;
  }
  Set.insert(make_pair(0, 1)), num = 1, ans = 0;
  while (num < n) {
    long long x = (*Set.begin()).first, y = (*Set.begin()).second;
    Set.erase(Set.begin());
    upmin(y, n - num);
    num += y, ans += (x + c0 + c1) * y;
    add(x + c0, y), add(x + c1, y);
  }
  printf("%lld\n", ans);
  return 0;
}
