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