#Shift only

N = int(eval(input()))

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

count = [0]*N

for a in range(N):

    count_local = 0

    while A[a]%2 == 0:

        A[a] = A[a]/2

        count_local += 1

        if count_local >= count[a]:

            count[a] = count_local



print((min(count)))
c=0;N,*A=list(map(int,open(0).read().split())) #open(0).read()でどんな形も読み込み可能。

while all([i&1==0 for i in A]):A=list([i>>1 for i in A]);c+=1

print(c)
# Shift only
N = int(eval(input()))
A = list(map(int, input().split()))
count = [0] * N
for a in range(N):
    count_local = 0
    while A[a] % 2 == 0:
        A[a] = A[a] / 2
        count_local += 1
        if count_local >= count[a]:
            count[a] = count_local
print((min(count)))

c = 0
N, *A = list(map(int, open(0).read().split()))  # open(0).read()でどんな形も読み込み可能。
while all([i & 1 == 0 for i in A]):
    A = list([i >> 1 for i in A])
    c += 1
print(c)

-# Shift only -N = int(eval(input())) -A = list(map(int, input().split())) -count = [0] * N -for a in range(N): -    count_local = 0 -    while A[a] % 2 == 0: -        A[a] = A[a] / 2 -        count_local += 1 -        if count_local >= count[a]: -            count[a] = count_local -print((min(count))) +c = 0 +N, *A = list(map(int, open(0).read().split()))  # open(0).read()でどんな形も読み込み可能。 +while all([i & 1 == 0 for i in A]): +    A = list([i >> 1 for i in A]) +    c += 1 +print(c)