#include <string>
#include <cstdlib>
#include <fstream>
#include <cmath>
#include <cassert>
#include <vector>
#include <algorithm>

using namespace std;

typedef long double real;

const string filename = "intset",
             input_filename = filename + ".in",
             output_filename = filename + ".out";

#define MAXN 1000000

int p[MAXN];

int main (int, char **) {
  int i, j, n, l, m;
  ifstream in (input_filename.c_str());
  ofstream out (output_filename.c_str());  
  in >> n >> l >> m;
  if (l > m) {
    swap (l, m);
  }
  for (i = 0; i < n; i++) {
    p[i] = i < m ? 1 : 0;
  }
  srand48 (239);
  double res = 0.0; 
  int ITERS = 100000000.0 / l;
  for (i = 0; i < ITERS; i++) {
    int o = n, k = 0;
    for (j = 0; j < l; j++) {
      int idx = j + (lrand48 () % o);
      swap (p[j], p[idx]);
      k += p[j];
      o--;
    }
    res += (1.0 / ITERS) * k;
  }
  int r = res + 0.5;
  if (res < 0) {
    r = 0;
  }
  if (r > n) {
    r = n;
  }

  out << r << endl;
  return 0;
}

