def solve():

    N = int(eval(input()))

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

    ans = 0

    while True:

        for i in range(N):

            if A[i] % 2 != 0:

                return ans // N

            A[i] //= 2

            ans += 1



    return ans



print((solve()))

def solve():

    N = int(eval(input()))

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

    l = []



    for a in A:

        if a % 2 == 0:

            c = 0

            while a % 2 == 0:

                a //= 2

                c += 1

            l.append(c)

        else:

            l.append(0)



    return min(l)



print((solve()))

def solve():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    ans = 0
    while True:
        for i in range(N):
            if A[i] % 2 != 0:
                return ans // N
            A[i] //= 2
            ans += 1
    return ans


print((solve()))

def solve():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    l = []
    for a in A:
        if a % 2 == 0:
            c = 0
            while a % 2 == 0:
                a //= 2
                c += 1
            l.append(c)
        else:
            l.append(0)
    return min(l)


print((solve()))

-    ans = 0 -    while True: -        for i in range(N): -            if A[i] % 2 != 0: -                return ans // N -            A[i] //= 2 -            ans += 1 -    return ans +    l = [] +    for a in A: +        if a % 2 == 0: +            c = 0 +            while a % 2 == 0: +                a //= 2 +                c += 1 +            l.append(c) +        else: +            l.append(0) +    return min(l)