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