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()))

for i in A:
  if i%2 != 0:
    print(0)
    exit()
    
cnt = 0
m = min(A)
for j in range(10**9):
  if m%2 != 0:
    print(cnt)
    exit()

  else:
    cnt += 1
    m = m // 2
    
print(cnt)  
N = int(input())

A = list(map(int,input().split()))

def div_cnt(n):
  cnt = 0
  while n % 2 == 0:
    n /= 2
    cnt += 1
  return cnt

print(min(map(div_cnt,A)))