There are N positive integers written on a blackboard: A_1, ..., A_N.  Snuke can perform the following operation when all integers on the blackboard are even:    * Replace each integer X on the blackboard by X divided by 2.  Find the maximum possible number of operations that Snuke can perform.
N = int(input())
A= list(map(int,input().split()))

res = 0
while True:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] //= 2
        else:
            break
    else:
        res += 1
        print("#########")
        print(res)
        continue
    break

print(res)
N = int(input())
A= list(map(int,input().split()))

res = 0
while True:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] //= 2
        else:
            break
    else:
        res += 1
        continue
    break

print(res)