#include <bits/stdc++.h>
using namespace std;
void red() {
  cin.tie(0);
  cin.sync_with_stdio(false);
}
int main() {
  red();
  int n, a, b;
  cin >> n >> a >> b;
  int mx = 0;
  for (int i = 1; i < n; ++i) {
    int a1 = a / i, a2 = b / (n - i);
    mx = max(mx, min(a1, a2));
  }
  cout << mx;
}
