#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, a, b;
  cin >> n >> a >> b;
  long long int m = 0;
  for (long long int i = 1; i < n; i++) {
    long long int q = i;
    long long int w = n - i;
    long long int ca = a / q, cb = b / w;
    if (min(ca, cb) > m) m = min(ca, cb);
  }
  cout << m;
}
