solve xs = 2^e * (2^o `div` 2)
  where
    (e,o) = foldl step (0,0) xs
    step (a,b) x  
      | even x = (a+1,b)
      | otherwise = (a,b+1)

main = do
  getLine
  xs <- map read . words <$> getLine :: IO [Int]
  print $ solve xs
