#include <bits/stdc++.h>
using namespace std;
bool f(int m, int a, int b, int n) {
  int c = 0;
  if (a < m or b < m) return 0;
  while (a >= m) {
    c++;
    a = a - m;
  }
  while (b >= m) {
    c++;
    b = b - m;
  }
  return c >= n;
}
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  int l = 1;
  int h = a + b;
  int ans = 1;
  while (h >= l) {
    int m = (l + h) / 2;
    if (f(m, a, b, n)) {
      ans = max(ans, m);
      l = m + 1;
    } else
      h = m - 1;
  }
  cout << ans << endl;
  return 0;
}
