module Main(main) where

-- | solve
--
-- >>> solve 0 [8,12,40]
-- 2
--
-- >>> solve 0 [5,6,8,10]
-- 0
--
-- >>> solve 0 [382253568,723152896,37802240,379425024,404894720,471526144]
-- 8
--
solve :: Int -> [Int] -> Int
solve c ns = if (and . map even) ns then solve (c+1) (map (`div` 2) ns) else c


main :: IO ()
main = do
    getLine
    ns <- map read . words <$> getLine
    print $ solve 0 ns

