n = int(eval(input()))

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



cnt = 0

for i in range(100):



    if sum(list(1 for x in a if x % 2 == 1)) != 0:

        print(cnt)

        exit()

    

    a = list(x // 2 for x in a)

    cnt += 1



print(cnt)
n = int(eval(input()))

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



cnt = 0

while True:

    if sum(list(1 for x in a if x % 2 == 1)) != 0:

        print(cnt)

        exit()  

    a = list(x // 2 for x in a)

    cnt += 1

print(cnt)
n = int(eval(input()))
a = list(map(int, input().split()))
cnt = 0
for i in range(100):
    if sum(list(1 for x in a if x % 2 == 1)) != 0:
        print(cnt)
        exit()
    a = list(x // 2 for x in a)
    cnt += 1
print(cnt)

n = int(eval(input()))
a = list(map(int, input().split()))
cnt = 0
while True:
    if sum(list(1 for x in a if x % 2 == 1)) != 0:
        print(cnt)
        exit()
    a = list(x // 2 for x in a)
    cnt += 1
print(cnt)

-for i in range(100): +while True: