import Control.Applicative ((<$>), (<*>)) import Data.List import Data.Char (isSpace) import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B main :: IO () main = do solve <$> readLn <*> readIntList >>= print solve :: Int -> [Int] -> Int solve n xs = let en = foldl' f 0 xs in abs $ n - 2 * en where f a y = if even y then a + 1 else a readIntList :: IO [Int] readIntList = unfoldr f <$> B.getLine where f s = do (n, s') <- B.readInt s return (n, B.dropWhile isSpace s')