#include <bits/stdc++.h>
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  int num = 0, min = 0;
  int i, j;
  int numa, numb;
  int temp;
  for (i = 1; i < n; ++i) {
    j = n - i;
    numa = a / i;
    numb = b / j;
    if (numa < numb) {
      temp = numa;
    } else {
      temp = numb;
    }
    if (temp > min) {
      min = temp;
    }
  }
  printf("%d\n", min);
  return 0;
}
