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

solve :: [Int] -> Int
solve [] = 0
solve (a:as)
  | odd a  = solve as
  | even a = solve ((a `div` 2) : as) + 1