#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, x;
  cin >> n >> a >> b;
  if (n == a + b)
    cout << 1;
  else {
    int max = 0;
    int x, y;
    int min = 201;
    int z, l;
    for (int i = 1; i < n; i++) {
      x = a / i;
      y = b / (n - i);
      if (x < y) {
        min = x;
      } else
        min = y;
      if (max < min) {
        max = min;
      }
    }
    cout << max;
  }
  return 0;
}
