#include <bits/stdc++.h>
const int N = 1e6 + 3;
const long long INF = 1e18 + 100;
const int inf = 1e9 + 100;
const int MOD = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  int maxi = 0;
  for (int x = 1; x < n; x++) {
    maxi = max(min(a / x, b / (n - x)), maxi);
  }
  cout << maxi;
}
