
initialQues :: [Int] -> Int
initialQues xs = case filter odd xs of
            [] -> 1 + query xs
            _  -> 0

query :: [Int] -> Int
query xs = case filter odd $ map (`div` 2) xs of
             [] -> query (map (`div` 2) xs)+1
             _  -> 0

main::IO()
main = do
    n <- getLine
    s <- map read . words <$> getLine ::IO [Int] 

    print $ initialQues s
