// Problem: B. Two Cakes // Contest: Educational Codeforces Round 35 (Rated for Div. 2) // URL: https://codeforces.com/contest/911/problem/B // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org)
/* Name: Author: xiaruize Date: */ #include<bits/stdc++.h> usingnamespace std; #define int long long #define ull unsigned long long #define ALL(a) (a).begin(), (a).end() #define pb push_back #define mk make_pair #define pii pair<int, int> #define pis pair<int, string> #define sec second #define fir first #define sz(a) int((a).size()) #define rep(i, x, y) for (int i = x; i <= y; i++) #define repp(i, x, y) for (int i = x; i >= y; i--) #define Yes cout << "Yes" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define NO cout << "NO" << endl #define double long double constint INF = 0x3f3f3f3f; constint MOD = 1000000007; constint N = 1e5 + 10;
// bool st; int n, a, b; // bool en;
signedmain() { // freopen(".in","r",stdin); // freopen(".out","w",stdout); // cerr<<(&en-&st)/1024.0/1024.0<<endl; cin >> n >> a >> b; int l = 1, r = min(a, b); while (l < r) { int mid = l + r + 1 >> 1; if (a / mid + b / mid >= n) l = mid; else r = mid - 1; } cout << l << endl; return0; }