t,a,b=map(int,input().split()) print(t//a+t//b+t//lcm(a,b)+1)