#include <bits/stdc++.h>
using std::abs;
using std::bitset;
using std::cerr;
using std::cin;
using std::copy;
using std::cout;
using std::deque;
using std::endl;
using std::fill;
using std::fixed;
using std::greater;
using std::iota;
using std::istream;
using std::lower_bound;
using std::make_pair;
using std::make_tuple;
using std::map;
using std::max;
using std::max_element;
using std::min;
using std::min_element;
using std::multiset;
using std::next_permutation;
using std::nth_element;
using std::ostream;
using std::pair;
using std::priority_queue;
using std::queue;
using std::reverse;
using std::rotate;
using std::set;
using std::sort;
using std::string;
using std::swap;
using std::tie;
using std::tuple;
using std::unique;
using std::unordered_map;
using std::unordered_set;
using std::upper_bound;
using std::vector;
int const INF = 100 + (int)1e9;
long long const INFL = 100 + (long long)1e18;
long double const PI = 3.1415926535897932384626433832795028;
std::mt19937 mt19937(960172);
long long rnd(long long x, long long y) {
  static auto gen =
      std::bind(std::uniform_int_distribution<long long>(), mt19937);
  return gen() % (y - x + 1) + x;
}
long long gcd(long long a, long long b) {
  while (b > 0) {
    long long t = a % b;
    a = b;
    b = t;
  }
  return a;
}
long long sqr(int a) { return (long long)a * a; }
long double sqr(long double a) { return a * a; }
void solve() {
  long long n, c0, c1;
  cin >> n >> c0 >> c1;
  if (c0 == 0 || c1 == 0) {
    cout << (long long)(n - 1) * (c0 + c1) << endl;
    return;
  }
  map<long long, long long> f;
  f[0] = 1;
  long long cnt = 1;
  long long cost = 0;
  long long steps = 0;
  while (cnt < n) {
    ++steps;
    long long len = f.begin()->first;
    long long tw = min(n - cnt, f[len]);
    cnt += tw;
    cost += tw * (len + c0 + c1);
    f.erase(len);
    f[len + c0] += tw;
    f[len + c1] += tw;
  }
  cout << cost << endl;
}
int main() {
  cout.precision(15);
  cout << fixed;
  cerr.precision(6);
  cerr << fixed;
  solve();
}
