n=int(eval(input()))

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

ans=0

c=True



while c == True:

    for i in range(n):

        if l[i]%2==1:

            c = False

    if c == False:

        break

    else:

        for i in range(n):

            l[i]/=2

        ans+=1

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

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

Flag=1

cnt=0

for i in range(10**9):

    for j in range(n):

        if l[j]%2==0:

            l[j]//=2

        else:

            Flag=0

    if Flag==0: break

    cnt+=1

print(cnt) 
n = int(eval(input()))
l = list(map(int, input().split()))
ans = 0
c = True
while c == True:
    for i in range(n):
        if l[i] % 2 == 1:
            c = False
    if c == False:
        break
    else:
        for i in range(n):
            l[i] /= 2
        ans += 1
print(ans)

n = int(eval(input()))
l = list(map(int, input().split()))
Flag = 1
cnt = 0
for i in range(10**9):
    for j in range(n):
        if l[j] % 2 == 0:
            l[j] //= 2
        else:
            Flag = 0
    if Flag == 0:
        break
    cnt += 1
print(cnt)

-ans = 0 -c = True -while c == True: -    for i in range(n): -        if l[i] % 2 == 1: -            c = False -    if c == False: +Flag = 1 +cnt = 0 +for i in range(10**9): +    for j in range(n): +        if l[j] % 2 == 0: +            l[j] //= 2 +        else: +            Flag = 0 +    if Flag == 0: -    else: -        for i in range(n): -            l[i] /= 2 -        ans += 1 -print(ans) +    cnt += 1 +print(cnt)