main :: IO ()
main = do
    _ <- getLine
    list <- map read . words <$> getLine
    putStrLn $ show $ divide 0 list

divide :: Int -> [Int] -> Int
divide _ [] = 0
divide num nums
    | any odd nums = num
    | otherwise = divide (num + 1) (map (`div` 2) nums)