module Main where

import           Control.Monad
import           Data.List
import           Data.List.Split
import qualified Data.Vector.Unboxed as V

solve xs = if ok
           then 1 + solve ds
           else 0
  where
    dms = map (`divMod` 2) xs

    ok = all (\a -> snd a == 0) dms

    ds = map fst dms

main :: IO ()
main = do
  _ <- getLine
  xs <- map read . words <$> getLine
  print $ solve xs
