import Data.List main = getLine >> getLine >>= print . (`mod` 2) . genericLength . words