main :: IO ()
main = do
    (_:as) <- map read . words <$> getContents
    print $ minNumDiv as

minNumDiv :: [Int] -> Int
minNumDiv = minimum . map numDiv

numDiv :: Int -> Int
numDiv = length . takeWhile even . iterate (`div` 2)
