#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  int c = max(a, b);
  int d = min(a, b);
  int i = d;
  int j;
  while (true) {
    if (i * n <= c + d && (n - (c / i)) * i <= d) {
      j = i;
      break;
    }
    i--;
  }
  cout << j << endl;
  return 0;
}
