import qualified Data.ByteString.Char8 as C
import Data.Maybe ( fromJust )

readInts :: IO [Int]
readInts = map (fst . fromJust . C.readInt) . C.words <$> C.getLine

main :: IO ()
main = do
  _  <- getLine 
  as <- readInts
  print $ counter as

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

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