#include <iostream>
using namespace std;
int bin_s(int n, int x, int y){
int l=0, r=2e9;
while(l<r){
int m=(l+r)/2;
int k=m/x+m/y;
if(k<n)
l=m+1;
else r=m;
}
return l;
}
int main() {
int n,x,y;
cin>>n>>x>>y;
cout<<bin_s(n-1,x,y)+min(x,y);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgYmluX3MoaW50IG4sIGludCB4LCBpbnQgeSl7CglpbnQgbD0wLCByPTJlOTsKCXdoaWxlKGw8cil7CgkJaW50IG09KGwrcikvMjsKCQlpbnQgaz1tL3grbS95OwoJCWlmKGs8bikKCQkJbD1tKzE7CgkJZWxzZSByPW07Cgl9CglyZXR1cm4gbDsKfQppbnQgbWFpbigpIHsKICAgIGludCBuLHgseTsKICAgIGNpbj4+bj4+eD4+eTsKICAgIGNvdXQ8PGJpbl9zKG4tMSx4LHkpK21pbih4LHkpOwogICAgcmV0dXJuIDA7Cn0K