import numpy as np

# 複数個格納

# A B = map(int, input().split())

# 行列化

# A = np.array(A)

# A=A.reshape(1,-1)

# A=A.T



N = int(eval(input()))

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

A = np.array(A)

A=A.reshape(1,-1)

vector0=A*0

count=0

i=0

flg=False



for i in range(19999):

    B=A%2

    for k in range(N-1) :

        if B[0,k] != 0:

            flg = True

            break

    if flg:

        break

    count=count+1

    A=A/2



print(count)
import numpy as np

# 複数個格納

# A B = map(int, input().split())

# 行列化

# A = np.array(A)

# A=A.reshape(1,-1)

# A=A.T



N = int(eval(input()))

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

A = np.array(A)

A=A.reshape(1,-1)

vector0=A*0

count=0

i=0

flg=False



for i in range(100):

    B=A%2

    C=((A%2 == vector0).all())

    if C == False:

        break

    count=count+1

    A=A/2



print(count)
import numpy as np

# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T
N = int(eval(input()))
A = list(map(int, input().split()))
A = np.array(A)
A = A.reshape(1, -1)
vector0 = A * 0
count = 0
i = 0
flg = False
for i in range(19999):
    B = A % 2
    for k in range(N - 1):
        if B[0, k] != 0:
            flg = True
            break
    if flg:
        break
    count = count + 1
    A = A / 2
print(count)

import numpy as np

# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T
N = int(eval(input()))
A = list(map(int, input().split()))
A = np.array(A)
A = A.reshape(1, -1)
vector0 = A * 0
count = 0
i = 0
flg = False
for i in range(100):
    B = A % 2
    C = (A % 2 == vector0).all()
    if C == False:
        break
    count = count + 1
    A = A / 2
print(count)

-for i in range(19999): +for i in range(100): -    for k in range(N - 1): -        if B[0, k] != 0: -            flg = True -            break -    if flg: +    C = (A % 2 == vector0).all() +    if C == False: