solve :: [Int] -> Int -> Int
solve l n
    | all (\x -> (even x && x > 0)) l = solve (map (`div` 2) l) $ n + 1
    | otherwise = n

main = do
    _ <- getLine
    t <- (map read . words) <$> getLine
    putStrLn $ show $ solve t 0
