#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,x,y;
cin>>n>>x>>y;
long long lo=0,hi=1e18;
long long ans=0;
while(lo<=hi)
{
long long mid =(lo+hi)>>1;
if(mid/x+mid/y>= n)
{
ans=mid;
hi=mid-1;
}
else
lo=mid+1;
}
cout<<ans;
return 0;
}