#include <bits/stdc++.h>
using namespace std;
void fre() {
  freopen("c://test//input.in", "r", stdin);
  freopen("c://test//output.out", "w", stdout);
}
template <class T1, class T2>
inline void gmax(T1 &a, T2 b) {
  if (b > a) a = b;
}
template <class T1, class T2>
inline void gmin(T1 &a, T2 b) {
  if (b < a) a = b;
}
const int N = 0, M = 0, Z = 1e9 + 7, inf = 0x3f3f3f3f;
template <class T1, class T2>
inline void gadd(T1 &a, T2 b) {
  a = (a + b) % Z;
}
int n, c0, c1;
map<long long, int> f;
int main() {
  while (~scanf("%d%d%d", &n, &c0, &c1)) {
    if (c0 == 0 || c1 == 0) {
      long long ans = (n - 1ll) * (c0 + c1);
      printf("%lld\n", ans);
      continue;
    }
    f[0] = 1;
    --n;
    while (1) {
      auto it = f.begin();
      long long cost = it->first;
      int num = it->second;
      int need = min(n, num);
      f[cost] -= need;
      if (f[cost] == 0) f.erase(cost);
      f[cost + c0] += need;
      f[cost + c1] += need;
      n -= need;
      if (n == 0) break;
    }
    long long ans = 0;
    for (auto it : f) {
      ans += it.first * it.second;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
