n, l, h = gets.chomp.split.map(&:to_i) c = gets.chomp.split.map(&:to_i) if c.count(1) == 1 if c.size == 1 puts(h-l+1) exit end elsif c.count(1) > 1 puts 0 exit end answerCount = 0 l.upto(h) do |i| disCount = 0 0.upto(n-1) do |j| if i % c[j] == 0 disCount += 1 end end if disCount == 1 answerCount += 1 end end puts answerCount