#include <bits/stdc++.h>
using namespace std;
int n, a, b;
void Enter() { cin >> n >> a >> b; }
void Solve() {
  int kq = 0;
  for (int i = 1; i < n; i++) {
    kq = max(kq, min(a / i, b / (n - i)));
  }
  cout << kq;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  Enter();
  Solve();
}
