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