import qualified Data.ByteString.Lazy.Char8 as C import Data.Maybe (fromJust) unsafeReadInt :: C.ByteString -> Int unsafeReadInt = fst . fromJust . C.readInt main :: IO () main = print . abs . sum . map (f . unsafeReadInt) . tail . C.words =<< C.getContents where f x = if odd x then -1 else 1