import Control.Monad.State

main = do
    inputs <- getLine >> getInts
    putStrLn . show $ evalState div2 (inputs, 0)
div2 :: State ([Int], Int) Int
div2 = do
    (arr, cnt)<- get
    if all (\x -> mod x 2 == 0) arr 
    then modify(\_ -> (map (\x -> div x 2)arr,cnt+1)) >> div2
    else return cnt

getInts = map read . words <$> getLine
