import Control.Applicative

main :: IO ()
main = solve <$> f <*> f >>= print
  where
    f = head <$> map read <$> words <$> getLine

solve :: Int -> Int -> Int
solve m1 m2
  | m1 == m2 = 0
  | otherwise = 1
