#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigMod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T modInverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
const int dx[] = {0, -1, 0, 1, -1, 1, 1, -1, -2, -2, 2, 2, -1, -1, 1, 1};
const int dy[] = {-1, 0, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -2, 2, -2, 2};
int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  int mn, ans = -1;
  for (int i = 1; i < n; i++) {
    int f = a / i;
    int s = b / (n - i);
    if (!f || !s) continue;
    mn = min(f, s);
    ans = max(ans, mn);
  }
  printf("%d\n", ans);
  return 0;
}
