main = do [a, b] <- map read . words <$> getLine print $ solve a b solve :: Int -> Int -> Int solve a b = length [ i | i <- [a..b], (a + b + i) `mod` 3 == 0 ]