import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  getLine
  as <- map (read::String->Int) . words <$> getLine
  print $shiftonly 0 as

shiftonly x y = if all even y
                    then shiftonly (x+1) $ map (`div`2) y
                    else x