#include <bits/stdc++.h>
using namespace std;
int main(){
int n,x,y;
cin>>n>>x>>y;
long long ans = 0;
long long high = 1e10, low = 0;
while(high>=low){
long long mid = (high+low)/2;
long long time = mid/y + mid/x;
// cout<<mid<<" ----> "<<time<<endl;
if(time >= n){
high = mid-1;
ans = mid;
}
else
low = mid+1;
}
cout<<ans;
}