#include <bits/stdc++.h>
using namespace std;
long double pi = 3.14159265359;
long long mod = 1000000007;
long long GCD(long long n1, long long n2) {
  if (n2 != 0)
    return GCD(n2, n1 % n2);
  else
    return n1;
}
long long LCM(long long n1, long long n2) {
  long long m;
  m = n1 * n2 / GCD(n1, n2);
  return m;
}
long long choose(long long n, long long k) {
  if (k > n) {
    return 0;
  }
  long long r = 1;
  for (long long d = 1; d <= k; ++d) {
    r *= n--;
    r /= d;
  }
  return r;
}
bool isprime(int x) {
  if (x == 1) return 0;
  for (int i = 2; i < x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
long long pow_(long long base, long long exponent) {
  long long result = 1;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % mod;
    exponent = exponent >> 1;
    base = (base * base) % mod;
  }
  return result;
}
const int N = 1e5 + 5;
long long F[N], iF[N];
long long fast(long long b, long long e) {
  if (!e) return 1;
  if (e & 1) return b * fast(b * b % mod, e >> 1) % mod;
  return fast(b * b % mod, e >> 1) % mod;
}
void init() {
  F[0] = iF[1] = iF[0] = F[1] = 1;
  for (long long i = 2; i < N; i++) {
    F[i] = i * F[i - 1] % mod;
    iF[i] = fast(F[i], mod - 2);
  }
}
long long nCr(int n, int k) {
  long long ret = F[n];
  ret *= iF[n - k];
  ret %= mod;
  ret *= iF[k];
  ret %= mod;
  return ret;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int res = 0;
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 1; i <= n - 1; i++) {
    res = max(res, min(a / i, b / (n - i)));
  }
  cout << res << endl;
  return 0;
}
