n=int(eval(input()))

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

ans=0

def check_all():

    global a,n

    for i in range(n):

        if a[i]%2!=0:

            return False

    return True

while check_all():

    ans+=1

    for i in range(n):

        a[i]//=2

print(ans)

n=int(eval(input()))

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

ans=0



while all(i%2==0 for i in a):

    ans+=1

    for j in range(n):

        a[j]//=2

print(ans)

n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0


def check_all():
    global a, n
    for i in range(n):
        if a[i] % 2 != 0:
            return False
    return True


while check_all():
    ans += 1
    for i in range(n):
        a[i] //= 2
print(ans)

n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
while all(i % 2 == 0 for i in a):
    ans += 1
    for j in range(n):
        a[j] //= 2
print(ans)

- - -def check_all(): -    global a, n -    for i in range(n): -        if a[i] % 2 != 0: -            return False -    return True - - -while check_all(): +while all(i % 2 == 0 for i in a): -    for i in range(n): -        a[i] //= 2 +    for j in range(n): +        a[j] //= 2