function main(input) {
  let inputs = input.split(/\n/);
  let args = inputs[1].split(/\s/);
  let isComplete = false;
  let count = 0;
  let isFirstTime = true;
  while (!isComplete) {
    isComplete = false;
    for (let i = 0;i < inputs[0];i++) {
      if (args[i] % 2 === 0) {
        args[i] = args / 2;
      } else {
        isComplete = true;
      }
    }
    count++;
    if (isFirstTime && isComplete) {
      count = 0;
    }
    isFirstTime = false;
  }
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));