#include <bits/stdc++.h>
long long cmpfunc(const void* a, const void* b) {
  return (*(long long*)a - *(long long*)b);
}
int main(void) {
  long long int test, i, j, n, count, flag = 0, o1 = 0, o2 = 0, b1, x, m, l,
                                      max, sum2, min, f, c, r, o, sum1, sum = 0,
                                      y, a, b, count1 = 0, a2, b2;
  scanf("%lld%lld%lld", &n, &a, &b);
  max = f = x = y = 0;
  for (i = 1; i < n; i++) {
    x = a / i;
    y = b / (n - i);
    if (x > y) {
      f = y;
    } else {
      f = x;
    }
    if (f > max) {
      max = f;
    }
  }
  printf("%lld", max);
  return 0;
}
