#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int check(int p) {
  int res;
  res = a / p + b / p;
  if (a / p == 0 || b / p == 0) return 0;
  if (res >= n)
    return 1;
  else
    return 0;
}
int main() {
  int l, r, mid;
  scanf("%d%d%d", &n, &a, &b);
  r = a + b;
  l = 1;
  while (r - l > 1) {
    mid = (r + l) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%d\n", l);
  return 0;
}
