#include <cstdio>
#include <cassert>
#include <algorithm>

using namespace std;

const int maxN = 100000;
const int inf = 1e9;

int n, a, b;

int get( int k ) {
  if (k == 0) {
    return -inf;
  } else if (k == 1) {
    return 0;
  } else {
//    fprintf(stderr, "get(k=%d)\n", k);
    assert(k >= 0);
    int res = inf;
    for (int p = 0; p <= n - k; p++) {
      for (int q = 1; q <= k; q++) {
        for (int r = 0; p + r <= n - k; r++) {
          int s = p + q - r;
          if (s < 1 || s + q > k) {
            continue;
          }
//          fprintf(stderr, "p=%d q=%d r=%d s=%d\n", p, q, r, s);
          res = min(res, max(a + get(k - q - s), b + max(get(q), get(s))));
        }
      }
    }
    return res;
  }
}

int main() {
  assert(freopen("apricot.in", "r", stdin));
  assert(freopen("apricot.out", "w", stdout));

  assert(scanf("%d%d%d", &n, &a, &b) == 3);
  printf("%d\n", get(n));

  return 0;
}
