{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as BC
import           Data.List             (unfoldr)
import           Data.Maybe            (fromJust)

main :: IO ()
main = do
  n <- readLn
  as <- readInts
  print $ solve n as

readInts :: IO [Int]
readInts = map (fst . fromJust . BC.readInt) . BC.words <$> BC.getLine

solve :: Int -> [Int] -> Int
solve n as = length $ unfoldr unfolder as

unfolder :: [Int] -> Maybe ((), [Int])
unfolder as
  | all even as = Just ((), map (`div` 2) as)
  | otherwise = Nothing
