#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, minn = 0;
  cin >> n >> a >> b;
  for (int i = 1; i < n; i++) {
    if (a / i >= 1 && b / (n - i) >= 1) {
      if (min(a / i, b / (n - i)) > minn) minn = min(a / i, b / (n - i));
    }
  }
  printf("%d", minn);
  return 0;
}
