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