N,L,H=map(int,input().split()) A=list(map(int,input().split())) def gcd(a,b): return a if b == 0 else gcd(b, a%b) ans = 0 for bit in range(1,1<> i & 1: t += 1 l = l//gcd(l,A[i])*A[i] x = H//l - (L-1)//l if t % 2 == 0: x = -x ans += t * x print(ans)