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

counter
  :: [Int] -> Int
counter = helper 0

helper
  :: Int -> [Int] -> Int
helper k ms
  | all even ms = helper (k+1) $! (map (`div` 2) ms)
  | otherwise   = k