#include <bits/stdc++.h>
using namespace std;
int n, a, b, otv;
int main() {
  cin >> n >> a >> b;
  for (int i = 1; i < n; i++) {
    otv = max(min(int(floor(double(a) / i)), int(floor(double(b) / (n - i)))),
              otv);
  }
  cout << otv;
}
