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())
lst = input().split()
i = 0
tmp = 0
while tmp>0:
  tmp = sum([x%2 for x in lst])
  lst = [x/2 for x in lst]
  i += 1
print(i-1)
N = input()
lst = [int(x) for x in input().split()]
idx = 0
while sum([x%2 for x in lst]) == 0:
    lst = [x/2 for x in lst]
    idx += 1
print(idx)