twoDiv :: Int -> Int
twoDiv x = if x `mod` 2 == 1
            then 0
            else 1 + twoDiv (x `div` 2)

main = do
 n <- readLn :: IO Int
 a <- map read . words <$> getLine :: IO [Int]
 putStrLn $ show $ minimum $ map twoDiv a