import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  n <- (read::String -> Int) <$> getLine
  arr <- map (read::String -> Int) . words <$> getLine
  print . minimum $ map countPower arr

countPower::Int -> Int
countPower x = if x `mod` 2 == 0 then 1 + countPower (x `div` 2) else 0
