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

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