#include <bits/stdc++.h> using namespace std; int main(){ long long n,a,b; cin>>n>>a>>b; int e = 0, s = n*min(a,b); while(e<s){ long long mid = (s+e)/2; if(mid/a+mid/b>=n){ s = mid; } else{ e = mid+1; } } cout<<min(e,s)<<endl; }