import Data.Bits

main :: IO ()
main = do
  [x, y] <- map read . words <$> getLine :: IO [Int]
  print $ xor x y