Module Module1

sub Main(ByVal args() as String)
    dim n as integer
    n = Console.ReadLine()

    dim arr(n) as string
    arr=Split(Console.ReadLine())
    dim a(n) as integer
    for i as integer = 0 to n - 1 step 1
        a(i) = arr(i)
    next i

    dim c as integer = 0
    do
        for i as integer = 0 to n - 1 step 1
            if a(i) mod 2 = 0 then
                a(i) = a(i) / 2
            else
                exit do
            end if
        next i

        c += 1
    loop

    Console.WriteLine(c)
end sub

end Module