calc:: Int -> Int
calc n
  | n == 0 || n `mod` 2 /= 0 = 0
  | otherwise = succ $ calc (n `div` 2)

main = do
  _ <- getLine
  line <- getLine
  let
    ans = minimum $ map calc (map read $ words line :: [Int])
  putStrLn $ show ans
