function main(input) 
{
    input = input.split("\n");
    var integers = input[1].split(" ").map(Number);
    var counts = Array(integers.length).fill(0);

    for (i = 0; i < integers.length; i++)
        {
            while ((integers[i] % 2) == 0)
            {
                integers[i] /= 2;
                counts[i] += 1;
            }
        }
    console.log(Math.max.apply(null, counts));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));