#include <bits/stdc++.h>
using namespace std;
const int N = 1000007, inf = 0x3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  int n, a, b, p, q;
  cin >> n >> a >> b;
  int ans = 0;
  for (int i = 1; i < n; ++i) {
    p = i;
    q = n - i;
    ans = max(ans, min(a / p, b / q));
  }
  cout << ans << endl;
}
