#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  int a, b, ans = 0;
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= a; i++) {
    if (n - i <= 0) break;
    ans = max(ans, min(a / i, b / (n - i)));
  }
  printf("%d\n", ans);
}
