#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <class T, class U>
inline void Max(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void Min(T &a, U b) {
  if (a > b) a = b;
}
inline void add(int &a, int b) {
  a += b;
  while (a >= 1000000007) a -= 1000000007;
}
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = ans * (long long)a % 1000000007;
    a = (long long)a * a % 1000000007;
    b >>= 1;
  }
  return ans;
}
int main() {
  int i, j, k = 0, ca = 0, T, K, n, m = 0;
  int c0, c1;
  scanf("%d%d%d", &n, &c0, &c1);
  if (c0 > c1) swap(c0, c1);
  if (c0 == 0) {
    cout << 1LL * (n - 1) * c1 << "\n";
    return 0;
  }
  map<long long, int> g;
  long long cc = c0 + c1, ans = 0;
  g[0] = 1;
  n--;
  while (n) {
    long long a = g.begin()->first;
    int b = g.begin()->second;
    g.erase(g.begin());
    int c = min(n, b);
    ans += (a + cc) * c;
    g[a + c0] += b;
    g[a + c1] += b;
    n -= c;
  }
  printf("%I64d\n", ans);
  return 0;
}
