main :: IO () main = interact $ show . abs . foldr (\x acc -> if x then acc + 1 else acc - 1) 0 . map (even . read) . tail . words