#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  int maxc = max(a, b), minc = min(a, b);
  int mi = 0;
  for (int i = 1; i < n; i++) {
    int micur = min(i, n - i);
    int macur = max(i, n - i);
    if (min(maxc / macur, minc / micur) > mi)
      mi = min(maxc / macur, minc / micur);
  }
  cout << mi;
}
