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 = map(int,input().split())
max = 1000
tmp = 0
for i in a:
    tmp = 0
    while i % 2 == 0:
        i = i / 2
        tmp += 1
    if max > tmp:
        max = tmp

print(tmp)
    

n = int(input())
a = map(int,input().split())
ans = 1000
tmp = 0
for i in a:
    tmp = 0
    while i % 2 == 0:
        i = i / 2
        tmp += 1
    if ans > tmp:
        ans = tmp
print(ans)
    
