import Control.Applicative

main = do
    _ <- read <$> getLine :: IO Int
    ls <- map read.words <$> getLine :: IO [Int]
    putStrLn.show $ answer ls

answer = sum.map (f 0)
f k 0 = k
f k v = if mod v 2 /= 0 then k else f (k+1) (div v 2)