N, L, H = [int(i) for i in input().split()] C = [int(i) for i in input().split()] ans_cnt=0 if N==1 and C[0]==1: print(H-L+1) else: for j in range(L,H+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)