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

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