from time import sleep

n = eval(input())

A = list(map(int, input().split()))

i = 0

while True:

    if len([a for a in A if a % 2]) > 0:

        break

    A = list([x/2 for x in A])

    i+=1

print(i)

n = eval(input())

A = list(map(int, input().split()))

i = 0

while True:

    if len([a for a in A if a % 2]) > 0:

        break

    A = list([x/2 for x in A])

    i+=1

print(i)

from time import sleep

n = eval(input())
A = list(map(int, input().split()))
i = 0
while True:
    if len([a for a in A if a % 2]) > 0:
        break
    A = list([x / 2 for x in A])
    i += 1
print(i)

n = eval(input())
A = list(map(int, input().split()))
i = 0
while True:
    if len([a for a in A if a % 2]) > 0:
        break
    A = list([x / 2 for x in A])
    i += 1
print(i)

-from time import sleep -