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