#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a % b) return gcd(b, a % b);
  return b;
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
void solve();
void file_i_o() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  file_i_o();
  solve();
  return 0;
}
void solve() {
  long long int n, first, second;
  cin >> n >> first >> second;
  long long int minimal = 0;
  for (long long int i = 1; i < n; i++) {
    minimal = max(minimal, min(first / i, second / (n - i)));
  }
  cout << minimal << "\n";
}
