#include <bits/stdc++.h>
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  int Pa, Pb, k, m, p;
  int x[60], y[100];
  for (Pa = 1, m = 1; Pa < n; Pa++) {
    Pb = n - Pa;
    if (a / Pa == 0 || b / Pb == 0)
      continue;
    else {
      k = a / Pa;
      p = b / Pb;
      if (k > p)
        y[m] = p;
      else
        y[m] = k;
      m++;
    }
  }
  int max = y[1];
  for (int i = 1; i < m; i++) {
    if (y[i] > max) {
      max = y[i];
    }
  }
  printf("%d\n", max);
  return 0;
}
