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