import Data.Bits ((.|.)) main :: IO () main = solve <$> f >>=print where f = map read <$> words <$> getLine solve :: [Int] -> Int solve [a, b] = product [1 .. a .|. b]