#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int T;
  T = 1;
  while (T--) {
    int n, a, b, i, j, l, r, mid, ans, x, y, ct;
    cin >> n >> a >> b;
    l = 1, r = (a + b);
    ans = -1;
    while (l <= r) {
      mid = (l + r) / 2;
      x = a, y = b;
      ct = 0;
      if (a >= mid && b >= mid) {
        ct = a / mid + b / mid;
      }
      if (ct < n) {
        r = mid - 1;
      } else {
        l = mid + 1;
        ans = mid;
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
