'use strict';

function main(inputs) {
  let i = 0;
  let input = inputs.split('\n');
  let numbers = input[1].split(' ');
  console.log(count_up(numbers, i));
}

function count_up(numbers, i) {
  let results = [];
  for (let k = 0, len = numbers.length; k < len; k++) {
    if (parseInt(numbers[k]) % 2 === 0) {
      results.push(numbers[k] / 2);
    } else {
      return i;
    }
  }
  i += 1;
  return count_up(results, i);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
