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