#include<bits/stdc++.h>
using namespace std;
long long MOD=1e9+7;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int i,j;
int n,a,b;
cin>>n>>a>>b;
if(a<b)
swap(a,b);
int den1 = int(floor(a*n*1.0/(a+b)));
if(den1 == 0)
den1++;
else if(den1 == n)
den1--;
int den2 = n-den1;
// cout<<den1<<" "<<den2<<endl;
int aa = a/den1;
int bb = b/den2;
// cout<<aa<<" "<<bb<<endl;
int ans = min(aa,bb);
den1 = int(ceil(a*n*1.0/(a+b)));
if(den1 == 0)
den1++;
else if(den1 == n)
den1--;
den2 = n-den1;
aa = a/den1;
bb = b/den2;
ans = max(ans,min(aa,bb));
cout<<ans<<endl;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIApsb25nIGxvbmcgTU9EPTFlOSs3OwogCmludCBtYWluKCkKewoJaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CgljaW4udGllKDApOwogCWludCBpLGo7CglpbnQgbixhLGI7CgljaW4+Pm4+PmE+PmI7CglpZihhPGIpCgkJc3dhcChhLGIpOwoJaW50IGRlbjEgPSAJaW50KGZsb29yKGEqbioxLjAvKGErYikpKTsKCWlmKGRlbjEgPT0gMCkKCQlkZW4xKys7CgllbHNlIGlmKGRlbjEgPT0gbikKCQlkZW4xLS07CglpbnQgZGVuMiA9IG4tZGVuMTsKIAovLwljb3V0PDxkZW4xPDwiICI8PGRlbjI8PGVuZGw7CglpbnQgYWEgPSBhL2RlbjE7CglpbnQgYmIgPSBiL2RlbjI7Ci8vCWNvdXQ8PGFhPDwiICI8PGJiPDxlbmRsOwoJaW50IGFucyA9IG1pbihhYSxiYik7CglkZW4xID0gCWludChjZWlsKGEqbioxLjAvKGErYikpKTsKCWlmKGRlbjEgPT0gMCkKCQlkZW4xKys7CgllbHNlIGlmKGRlbjEgPT0gbikKCQlkZW4xLS07CglkZW4yID0gbi1kZW4xOwogCWFhID0gYS9kZW4xOwoJYmIgPSBiL2RlbjI7CglhbnMgPSBtYXgoYW5zLG1pbihhYSxiYikpOwoJY291dDw8YW5zPDxlbmRsOwp9