N, L, H = [int(i) for i in input().split()] C = [int(i) for i in input().split()] ans_cnt=0 for j in range(L,H+1): cnt=1 sub_cnt=0 for k in range(N): if j%C[k]==0: sub_cnt+=1 if sub_cnt==2: break if sub_cnt==1: ans_cnt+=1 print(ans_cnt)