{-# LANGUAGE BangPatterns #-}

module Main where

import Control.Applicative
import Control.Monad

div2 :: Int -> Int
div2 n = iter 0 n
  where
    iter _ 0 = 0
    iter !i x
        | r == 0    = iter (i + 1) q
        | otherwise = i
      where
        (q, r) = x `divMod` 2

main :: IO ()
main = do
    getLine
    as <- fmap read . words <$> getLine :: IO [Int]
    let ans = fmap div2 as
    print $ sum ans