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()))
cnt = 0

for i in range(n):
    for j in range(len(a)):
        if(a[j] % 2 == 0):
            a[j] = a[j] //2
        else:
            quit()  
    cnt += 1
print(cnt)
n = int(input())
a = list(map(int, input().split()))
cnt = 0

while True:
    if sum([a[i]%2 for i in range(n)]) == 0:
        a = [int(n/2) for n in a]
        cnt += 1
    else:
        break
print(cnt)