module Main where main :: IO () main = do [from, to] <- map (read :: String -> Int) . words <$> getLine print $ sum [1 | d <- [23..25], from > d || to < d]