main :: IO () main = do n <- readLn :: IO Integer m <- readLn :: IO Integer print $ (n `mod` 10) ^ m `mod` 10