#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, a, b, m = 0;
  cin >> n >> a >> b;
  for (int i = 1; i < n; i++) {
    m = max(min(a / i, b / (n - i)), m);
  }
  cout << m << "\n";
}
