#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int inf = 1e9, dx[] = {0, 0, 1, -1, 1, 1, -1, -1},
          dy[] = {1, -1, 0, 0, 1, -1, 1, -1}, MOD = 1e9 + 7;
long double eps = 1e-7, pi = acos(-1);
int a, b, n, ans = 1;
bool f(int x) { return x && (a / x + b / x) >= n; }
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> a >> b;
  int st = 1, en = a + b, mid;
  while (st <= en) {
    mid = (st + en) / 2;
    if (f(mid)) {
      ans = mid;
      st = mid + 1;
    } else
      en = mid - 1;
  }
  cout << min(ans, min(a, b));
  return 0;
}
