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