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