from math import radians,cos,sin,tan,ceil,floor,log,factorial,gcd,pi lcm = lambda x,y:x*y//gcd(x,y) N,L,H = map(int,input().split()) C = list(map(int,input().split())) ans = 0 for bit in range(1,1<>i)&1: ret = lcm(ret,C[i]) popcnt += 1 if popcnt%2 == 1: ans += (H//ret - (L - 1)//ret) * popcnt else: ans -= (H//ret - (L - 1)//ret) * popcnt print(ans)