n = int(eval(input()))

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

flag = False

num = 0

while True:

    for i in range(len(li)):

        if li[i]%2 == 0:

            li[i] = li[i]//2

            if i == n-1:   

                flag = True

                num += 1

        else:

            print(num)

            exit()
n = int(eval(input()))

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

li = [bin(x) for x in li]



ans = 10**6

for i in range(len(li)):

    ans = min(ans,len(li[i])-li[i].rfind("1")-1)

print(ans)
n = int(eval(input()))
li = list(map(int, input().split()))
flag = False
num = 0
while True:
    for i in range(len(li)):
        if li[i] % 2 == 0:
            li[i] = li[i] // 2
            if i == n - 1:
                flag = True
                num += 1
        else:
            print(num)
            exit()

n = int(eval(input()))
li = list(map(int, input().split()))
li = [bin(x) for x in li]
ans = 10**6
for i in range(len(li)):
    ans = min(ans, len(li[i]) - li[i].rfind("1") - 1)
print(ans)

-flag = False -num = 0 -while True: -    for i in range(len(li)): -        if li[i] % 2 == 0: -            li[i] = li[i] // 2 -            if i == n - 1: -                flag = True -                num += 1 -        else: -            print(num) -            exit() +li = [bin(x) for x in li] +ans = 10**6 +for i in range(len(li)): +    ans = min(ans, len(li[i]) - li[i].rfind("1") - 1) +print(ans)