import Data.List (unfoldr)
import qualified Data.ByteString.Char8 as B
import Data.Char (isSpace)
import Data.Bits ((.&.), shiftR)

readInt = B.readInt . B.dropWhile isSpace

fact2 x
 | even x = fact2 (shiftR x 1) + 1
 | otherwise = 0

main = do
 getLine
 as <- unfoldr readInt <$> B.getLine :: IO [Int]
 print . sum . map fact2 $ as