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