import sys from math import gcd sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) N,L,H = MI() C = LI() ans = 0 for i in range(1,1<>j) & 1: c = C[j] a = (a*c)//gcd(a,c) r += 1 if r % 2 == 0: ans -= r*(H//a-(L-1)//a) else: ans += r*(H//a-(L-1)//a) print(ans)