var input = require("fs").readFileSync("/dev/stdin", "utf8");

var lines = input.split('\n');
var N = Number(lines[0]);
var words = lines[1].split(' ');

function countDiv2(n, count) {
    if (!n || n % 2) {
        return count;
    }
    var result = n / 2;
    return countDiv2(result, count + 1);
}

var min = 30;
for (var i = 0; i < N; i++) {
    var n = Number(words[i]);
    var count = countDiv2(n, 0);
    min = Math.min(min, count);
}
console.log(min);
