import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) n,l,h = list(map(int, input().split())) c = list(map(int, input().split())) from math import gcd ans = 0 for b in range(1<>i&1: s *= -1 v = v*c[i]//gcd(v,c[i]) size += 1 ans += s * size * (h//v - (l-1)//v) print(ans)