module Main (main) where

import Control.Applicative
import Control.Monad
import Data.Bits
import Data.List

main :: IO ()
main = do { [a, c] <- map read . words <$> getLine :: IO [Int]
                ;  let b = a `xor` c
                ; print b
                }