N = int(eval(input()))

A = [int(i) for i in input().split()]

ans = [0]*N

for i in range(N):

    while A[i] % 2 == 0:

        A[i] //= 2

        ans[i] += 1

print((min(ans)))

eval(input())

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

count = 0

while all(a % 2 == 0 for a in A):

    A = [a/2 for a in A]

    count += 1

print(count)
N = int(eval(input()))
A = [int(i) for i in input().split()]
ans = [0] * N
for i in range(N):
    while A[i] % 2 == 0:
        A[i] //= 2
        ans[i] += 1
print((min(ans)))

eval(input())
A = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a / 2 for a in A]
    count += 1
print(count)

-N = int(eval(input())) -A = [int(i) for i in input().split()] -ans = [0] * N -for i in range(N): -    while A[i] % 2 == 0: -        A[i] //= 2 -        ans[i] += 1 -print((min(ans))) +eval(input()) +A = list(map(int, input().split())) +count = 0 +while all(a % 2 == 0 for a in A): +    A = [a / 2 for a in A] +    count += 1 +print(count)