a, b = gets.chomp.split.map &:to_i if a < 23 if b < 23 p 3 elsif 25 < b p 0 else if b == 23 p 2 elsif b == 24 p 1 else p 0 end end elsif 25 < a p 3 else # a = 23, 24, 25 p 3 - (b - a + 1) end