#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long c) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b & 1) x = (x * y) % c;
    y = (y * y) % c;
    b /= 2;
  }
  return x % c;
}
int dx[] = {0, -1, 0, 1};
int dy[] = {-1, 0, 1, 0};
int dr[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dc[] = {0, 1, 1, 1, 0, -1, -1, -1};
int main() {
  long long n, a, b, ans = 0;
  scanf("%lld%lld%lld", &n, &a, &b);
  for (int i = 1; i <= n - 1; ++i) {
    ans = max(ans, min(a / i, b / (n - i)));
  }
  printf("%lld\n", ans);
  return 0;
}
