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 = [int(x) for x in input().split()]

while True:
    I = []
    count = 0
    for i in A:
        if i // 2 == 0:
            I.append(i)
            count += 1
        elif i//2 ==1:
            break
N = int(input())
# A = list(map(int, input().split()))
A = [int(x) for x in input().split()]

c = 0

while all(i % 2 == 0 for i in A):
    A = [i/2 for i in A]
    c += 1
print(c)