# include <iostream>
# include <cstdio>
# include <cstring>
# include <cmath>
# include <vector>
# include <algorithm>
# define LL long long
# define INF 0x3f3f3f3f
using namespace std;
LL n, x, y;
bool judge(LL mid)
{
return mid/x + mid/y >= n;
}
int main()
{
while(~scanf("%I64d%I64d%I64d",&n,&x,&y))
{
LL l=0, r=max(x,y)*n, mid;
while(l<r)
{
mid = (l+r)>>1;
if(judge(mid))
r = mid;
else
l = mid+1;
}
printf("%I64d\n",r);
}
return 0;
}

浙公网安备 33010602011771号