#include <bits/stdc++.h>
using namespace std;
int n, a, b;
bool check(int v) {
  if ((v > a) || (v > b)) return 0;
  int rem = n;
  rem -= a / v;
  rem -= b / v;
  if (rem > 0) return 0;
  return 1;
}
int main() {
  cin >> n >> a >> b;
  int st = 1;
  int nd = a + b;
  int ans = -1;
  while (st <= nd) {
    int md = (st + nd) / 2;
    if (check(md)) {
      ans = md;
      st = md + 1;
    } else
      nd = md - 1;
  }
  cout << ans;
  return 0;
}
