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