#include <bits/stdc++.h>
int p[100005];
int s[100005];
int main() {
  int m, n, a, b, i, j, t, x, y;
  while (scanf("%d%d%d", &n, &a, &b) != EOF) {
    m = -1;
    for (i = 1; i < n; i++) {
      x = a / i;
      y = b / (n - i);
      t = (((x) > (y)) ? (y) : (x));
      if (t > m) m = t;
    }
    printf("%d\n", m);
  }
}
