function main(arg) {
  var input = arg.trim().split('\n');
  var n = parseInt(input[0]);
  var numbers = input[1].split(' ').map(i => parseInt(i));

  count = 0;

  var canDivide = function(item) {
    return item % 2 === 0;
  };

  while (canDivide) {
    if (numbers.some(canDivide)) {
      count++;
      numbers = numbers.map(item => item / 2);
    } else {
      canDivide = false;
      console.log(count);
    }
  }
}

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