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