#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
map<long long, long long> mp;
void pp(long long x) {
  cout << x << endl;
  exit(0);
}
void fmain() {
  int a, b;
  cin >> n >> a >> b;
  if (b < a) swap(a, b);
  if (b == 0) pp(0);
  if (n == 1)
    pp(a);
  else if (n == 2)
    pp(a + b);
  else {
    if (a == 0) {
      pp((long long)b * (n - 1));
    }
    mp[a]++;
    mp[b]++;
    long long ans = a + b;
    for (int c = 2; c < n;) {
      auto it = mp.begin();
      long long co = it->first, cnt = it->second;
      long long x = min((long long)n - c, cnt);
      ans -= x * co;
      ans += x * (co + a) + x * (co + b);
      mp[co + a] += x;
      mp[co + b] += x;
      mp[co] -= x;
      c += x;
      if (mp[co] == 0) mp.erase(co);
    }
    pp(ans);
  }
}
int main() {
  fmain();
  return 0;
}
