#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 77;
const int Mod = 1e9 + 7;
int n, a, b, ans;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  ans = min(b / n, a / n);
  for (int i = 1; i < n; i++) {
    ans = max(ans, min(a / i, b / (n - i)));
  }
  printf("%d", ans);
  return 0;
}
