#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, x1, x2, now, ans = -99;
  cin >> n >> a >> b;
  if (n == a + b) {
    cout << "1" << endl;
  } else {
    for (x1 = 1; x1 < n; x1++) {
      x2 = n - x1;
      now = 700000;
      now = min(a / x1, now);
      now = min(b / x2, now);
      ans = max(ans, now);
    }
    cout << ans << endl;
  }
  return 0;
}
