import math t,a,b=map(int,input().split()) l=a*b/math.gcd(a,b) c=t//a+t//b-t//l+1 print(max(t//a,t//b) if l in [a,b] else str("{:.1f}".format(c))[:-2])