#include <iostream>
typedef long long ll;
using namespace std;
bool ll_is_valid(ll t, ll N, ll x, ll y)
{
return t / x + (t - x) / y >= N;
}
ll f(ll N, ll x, ll y)
{
ll R = 1;
while (!ll_is_valid(R,N,x,y)) R *= 2;
ll L = R / 2;
while(R - L > 1)
{
ll M = (L + R) / 2;
if (!ll_is_valid(M,N,x,y)) {L = M;}
else {R = M;}
}
return R;
}
int main()
{
ll N,x,y;
cin >> N >> x >> y;
if(x > y) swap( x, y );
cout << f(N, x, y) << std::endl;
}
begin
a:=99;
repeat
a:=a+1;
s:= a div 100;
ost:= a mod 100;
if ost>9 then
begin
d:= ost div 10 ;
ost:=ost mod 10;
end else d:= 0;
if ost<10 then ed:=ost;
until (a<1000) and (a*a=((s+d+ed)*(s+d+ed)*(s+d+ed)));
writeln('это число: ',a:3);
end.