import qualified Data.Char as Char import qualified Data.List as List import qualified Data.ByteString.Char8 as BSC8 getInt :: IO [Int] getInt = List.unfoldr f <$> BSC8.getLine where f s = do (n, s') <- BSC8.readInt s return (n, BSC8.dropWhile Char.isSpace s') main :: IO () main = do BSC8.getLine xs <- getInt ys <- getInt print $ abs $ sum ys - sum xs