loop do
  n, l, r = gets.split.map(&:to_i)
  break if n == 0
  a = (1..n).map { gets.to_i }
  leap = 0
  (l..r).each do |x|
    i = a.index {|y| x % y == 0}
    if i
      leap += 1 if i.even?
    else
      leap += 1 if n.even?
    end
  end
  p leap
end
