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