process.stdin.resume();
process.stdin.setEncoding('utf8');
// Your code here!

function main(input) {
    var arg = input.split('\n')[1].split(' ').map((n) => parseInt(n));
    var ans = Infinity;
    arg.forEach(function(value){
        var count = 0;
        while(value % 2 === 0){
            value /= 2;
            count += 1;
        }
        ans = Math.min(ans, count);
    });
    console.log(Math.max(0, ans));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));