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.
num_li = list(map(int, input().split()))
count = 0
loop = True
while True:
    for i in num_li:
        if i%2 == 1:
            loop = False
            break
    if loop == False:
        break
    else:
        count += 1
print(count)
length = int(input())
num_li = list(map(int, input().split()))
count = 0
loop = True
while loop == True:
    for i in range(length):
        if num_li[i]%2 == 1:
            loop = False
            break
        else:
            num_li[i] /= 2
    if loop == True:
        count += 1
print(count)