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