N = int(eval(input()))

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

ans = 0

flg = "True"



while flg == "True":

    ans += 1

    for i in range(N):

        if A[i] % 2 == 0:

            A[i] = A[i] / 2

        else:

            flg = "False"



print((ans - 1))

N = int(eval(input()))

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

ans = 0

while True:

  if sum(a) == 0:

    print(ans)

    exit()

  for i in range(N):

    if a[i]%2 == 0:

      a[i] //= 2

    else:

      print(ans)

      exit()

  ans += 1
N = int(eval(input()))
A = list(map(int, input().split()))
ans = 0
flg = "True"
while flg == "True":
    ans += 1
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] / 2
        else:
            flg = "False"
print((ans - 1))

N = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
while True:
    if sum(a) == 0:
        print(ans)
        exit()
    for i in range(N):
        if a[i] % 2 == 0:
            a[i] //= 2
        else:
            print(ans)
            exit()
    ans += 1

-A = list(map(int, input().split())) +a = list(map(int, input().split())) -flg = "True" -while flg == "True": +while True: +    if sum(a) == 0: +        print(ans) +        exit() +    for i in range(N): +        if a[i] % 2 == 0: +            a[i] //= 2 +        else: +            print(ans) +            exit() -    for i in range(N): -        if A[i] % 2 == 0: -            A[i] = A[i] / 2 -        else: -            flg = "False" -print((ans - 1))