'use strict'

function Main(input) {
  const inputList = input.split('\n');
  const n = inputList[0]
  const numbersList = inputList[1].split(' ')

  let count = -1;
  let result = numbersList

  while(result.length !== 0) {
    result = checkArrayEven(result)
    count++
  }

  console.log(count)
}

function checkArrayEven(array) {
  const newArray = new Array(array.length)
  for (let i=0; i<array.length; i++) {
    if (array[i] % 2 === 1) {
      return []
    } else {
      newArray[i] = array[i] / 2
    }
  }
  return newArray
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));