#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> vec(n);
  int ans = 0;
  for (int cur = 1; cur <= min(a, b); cur++) {
    int l = a, r = b;
    int flag = 1;
    for (int i = 0; i < n; i++) {
      if (l >= cur) {
        l = l - cur;
      } else if (r >= cur) {
        r = r - cur;
      } else {
        flag = 0;
        break;
      }
    }
    if (flag) ans = cur;
  }
  cout << ans;
}
