import Control.Monad
import Control.Applicative
import Data.List
import Data.Array
strToInt s = (read :: String -> Int) s

main = do

   n <- readLn :: IO Int
   an <- map strToInt . words <$> getLine
   print (solve an 0)

solve :: [Int] -> Int -> Int
solve an n = if an == bn 
             then solve (map (`div` 2) an) (n+1)
             else n
                where bn = filter evens an

evens :: Int -> Bool
evens a = if (even a) && (a /= 0)
          then True
          else False
