#include <bits/stdc++.h>
using namespace std;
long long n, c0, c1;
std::unordered_map<long long, long long> f;
std::priority_queue<long long, vector<long long>, greater<long long> > q;
namespace ae86 {
const long long bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline long long fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline long long read() {
  long long a = 0, b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
}  // namespace ae86
using ae86::read;
signed main() {
  n = read(), c0 = read(), c1 = read();
  if (!c0 || !c1) {
    printf("%lld\n", (n - 1) * std::max(c0, c1));
    return 0;
  }
  long long cnt = 1, ans = 0;
  f[0] = 1, q.push(0);
  while (cnt < n) {
    long long cur = q.top(), ad = std::min(n - cnt, f[cur]);
    q.pop();
    ans += (c0 + c1 + cur) * ad, cnt += ad, f[cur] -= ad;
    if (!f[cur + c0]) q.push(cur + c0);
    if (!f[cur + c1]) q.push(cur + c1);
    f[cur + c0] += ad, f[cur + c1] += ad;
  }
  printf("%lld\n", ans);
  return 0;
}
