#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  while (scanf("%d %d %d", &n, &a, &b) == 3) {
    int x = 1;
    int ans = 0;
    while (x <= n - 1 && (a / x) > (b / (n - x))) {
      ans = b / (n - x);
      x++;
    }
    if (x != n) ans = max(ans, a / x);
    printf("%d\n", ans);
  }
  return 0;
}
