a, b = gets.split.map(&:to_i) count = 3 (a..b).each do |x| if x == 23 count -= 1 end if x == 24 count -= 1 end if x == 25 count -= 1 end end puts count