Problem:
 Score : 200 points    Problem Statement There are N positive integers written on a blackboard: A_1, ..., A_N .  Snuke can perform the following operation when all integers on the blackboard are even:   Replace each integer X on the blackboard by X divided by 2 .   Find the maximum possible number of operations that Snuke can perform.      Constraints  1 \leq N \leq 200  1 \leq A_i \leq 10^9         Input Input is given from Standard Input in the following format:  N  A_1  A_2 ... A_N       Output Print the maximum possible number of operations that Snuke can perform.        Sample Input 1 3
8 12 40      Sample Output 1 2  Initially, [8, 12, 40] are written on the blackboard.
Since all those integers are even, Snuke can perform the operation.  After the operation is performed once, [4, 6, 20] are written on the blackboard.
Since all those integers are again even, he can perform the operation.  After the operation is performed twice, [2, 3, 10] are written on the blackboard.
Now, there is an odd number 3 on the blackboard, so he cannot perform the operation any more.  Thus, Snuke can perform the operation at most twice.       Sample Input 2 4
5 6 8 10      Sample Output 2 0  Since there is an odd number 5 on the blackboard already in the beginning, Snuke cannot perform the operation at all.       Sample Input 3 6
382253568 723152896 37802240 379425024 404894720 471526144      Sample Output 3 8

Solution (Python):
n = input()
a = list(map(int, input().split()))
c = 0
def han(a):
    b = list(map(lambda x: x % 2, a))
    c = 0
    for i in b:
        if i == 0:
            c += 1
        else:
            c -= 1
    if c == len(b):return 1
    else: return 0

while True:
    if han(a) == 1:
        a = list(map(lambda x: x / 2, a))
        c += 1
    if han(a) == 0: 
        break
        c = 0

print(c)

Solution (Python):

n = input()
n = int(n)


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


l = [0] * n


i = 0
for i in range(0,n):
	ans = 0
	check = nums[i]
	while check % 2 == 0:
		check = check / 2
		ans = ans + 1
		
	l[i] = ans



print(min(l))

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
cnt = 0
j = 1

while True:
    for i in range(n):
        if A[i] % (2 ** j) != 0:
            break
    else:
        j += 1
        cnt += 1
        continue
    break
print(cnt)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = []
for a in A:
    cnt = 0
    while (a > 0) and (~a & 1):
        a >>= 1
        cnt += 1
    ans.append(cnt)
print(min(ans))

Solution (Python):
import numpy as np

x = int(input())
y = input().split()
y = [int(i) for i in y]
y = np.array(y)
count = 0
while sum([y[i] % 2 for i in range(len(y))]) == 0:
    y = y/2
    count += 1
print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
while A.count(0) != len(A):
    if list(map(lambda x: x%2, A)).count(1) > 0:
       break
    A = list(map(lambda x: x/2, A))
    ans += 1
print(ans)

Solution (Python):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
flg = "True"

while flg == "True":
    ans += 1
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] / 2
        else:
            flg = "False"

print(ans - 1)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 1000000000

for i in range(n):
    count = 0
    while a[i] % 2 == 0:
        a[i] = a[i]//2
        count += 1
    if ans >= count:
        ans = count
print(ans)

Solution (Python):
def main():
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = 10**9
    for i in range(N):
        cnt = 0
        while A[i] % 2 == 0:
            A[i] = A[i] >> 1
            cnt+=1
        ans = min(ans, cnt)

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
cnt = 0
flag = True
while flag == True:
    for i in range(N):
        if A[i] % 2 != 0:
            flag = False
            break
        else:
            A[i] = A[i] // 2
    if flag == False:
        break
    else:
        cnt += 1
print(cnt)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
cnt = []
for i in range(len(A)):
    c = 0
    while A[i] % 2 == 0:
        A[i] //= 2
        c += 1
    cnt.append(c)
print(min(cnt))

Solution (Python):
cnt=0
b=1
N=int(input())
A=input().split()

A=[int(A[j]) for j in range(N)]

while b==1:
  for i in range(N):
    if A[i]%2==0:
      A[i]=A[i]/2
    else:
      b=0
      break
  if b==1:
    cnt+=1     
  else:
    break
print(cnt)

Solution (Python):
n = int(input())
A = list(map(int, input().split()))

res = 1e10
for a in A:
  c = 0
  while a % 2 == 0:
    c += 1
    a //= 2
  res = min(res, c)
print(res)

Solution (Python):
import fractions
N = int(input())
num = list(map(int,input().split()))
ans = num[0]
for i in range(1,N) :
    ans = fractions.gcd(ans,num[i])

if ans % 2 == 1 :
    print(0)
else :
    cnt = 0
    while ans/2 == int(ans/2) :
        ans /= 2
        cnt += 1
    print(cnt)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 10**9
for a in A:
  temp = 0
  while a % 2 == 0:
    a //= 2
    temp += 1
  ans = min(ans, temp)
print(ans)

Solution (Python):
n = int(input())
z = list(map(int,input().split()))

def half(n,z):
	existodd = 0
	count = 0
	while True: 
		for i in z:
			if i % 2 != 0:
				existodd = 1

		if existodd:
			print(count)
			break
		
		for i in range(n):		
			z[i] /= 2
		
		count += 1
	
half(n,z)

Solution (Python):


import sys
import math



def dev(an):
  ret = 0
  while True:
    for i in range(len(an)):
      if an[i]&1 == 1 or an[i] < 2:
        return ret
      else:
        an[i] //= 2
    ret += 1
    

if __name__ == "__main__":
  input()
  An = list(map(int, input().split()))  
  print(dev(An))

Solution (Python):
n = int(input())
as_ = (int(i) for i in input().split())
pow2s = [len(bin(i)) - bin(i).rfind('1') - 1 for i in as_]
print(min(pow2s))

Solution (Python):
def calc(x):
    res = 0
    while x % 2 == 0:
        x //= 2
        res += 1
    return res

N = int(input())
A = list(map(int,input().split()))
ans = 100
for a in A:
    ans = min(ans,calc(a))
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
count=n
while count==n:
    count=0
    for i in range(n):
        if a[i]%2==0:
            k=a[i]//2
            a.pop(i)
            a.insert(i,k)
            count+=1
    if count==n:
        ans+=1
    
print(ans)

Solution (Python):
def counter(r):
  cnt=0
  while r%2==0:
    r=int(r/2)
    cnt+=1
  return cnt

n=input()
a =map(int,input().split())
cnt=min(map(counter,a))
print(cnt)

Solution (Python):
N = int(input())
A = [int(x) for x in input().split()]
flag = True
i=-1
while(flag):
    i+=1
    for ind,x in enumerate(A):
        if(x%2 == 0):
            A[ind]//=2
        else:
            flag = False
            break

print(i)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

breakFlg = False
for ans in range(1,32):
    for i,a in enumerate(A):
        if a%2:
            ans -=1
            breakFlg = True
            break
        else:
            A[i] //= 2
    if breakFlg:
        break
print(ans)

Solution (Python):
input()
a=[int(x) for x in input().split()]
c=0
while all(x%2==0 for x in a):
    c+=1
    a=[x//2 for x in a]
print(c)

Solution (Python):
n = input()
a = list(map(int, input().split()))
cnt = 0;
while(True):
    if all([1 if x % 2 == 0 else 0 for x in a]):
        cnt += 1
        a = [x // 2 for x in a]
    else:
        break

print(cnt)

Solution (Python):
_ = input()
a_list = list(map(int, input().split()))

min_2_factor = 30
for a in a_list:
	a_2_factor = 0
	current_a = a
	while True:
		if current_a % 2 == 0:
			a_2_factor += 1
		else:
			min_2_factor = min(min_2_factor, a_2_factor)
			break
		current_a = current_a / 2
	

print(min_2_factor)

Solution (Python):
N = int(input()) 
A = list(map(int, input().split()))

count = 0
while all(elem % 2 == 0 for elem in A) :
    A = list(map(lambda x: x // 2, A))
    count = count + 1

print(count)

Solution (Python):
N = input()
A = list(map(int, input().split()))
cnt = 0
while all(i % 2 == 0 for i in A):
    A = [int(j / 2) for j in A]
    cnt += 1
print(cnt)

Solution (Python):
N = int(input())
a = [int(x) for x in input().split()]
b = [int(y) for y in range(N)]
for i in range(N):
    b[i]=0
    while a[i]%2==0:
        b[i]=b[i]+1
        a[i]=a[i]//2
print(min(b))

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]

ans = float('inf')
for i in a:
  tmp_ans = 0
  while i%2 == 0:
    i = i//2
    tmp_ans += 1
  ans = min(ans,tmp_ans)
print(ans)

Solution (Python):
N=int(input())

A=[int(i) for i in input().split()]

t=0

j=int()
while all(i%2==0 for i in A):
    A=[i/2 for i in A]
    t=t+1
    
print(t)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
gc = 0

def div2(a):
    global gc
    for i in range(n):
        if a[i] % 2:
            break
    else:
        gc += 1
        div2(list(map(lambda x: x // 2, a)))
    return gc

print(div2(a))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
cnt = 0
while True:
  f = True
  for i in range(N):
    if A[i] % 2 == 1:
      f = False
    else:
      A[i] /= 2
  if not f:
    break
  else:
    cnt += 1
print(cnt)

Solution (Python):
import sys

def main():
    N = input()
    A = [int(a) for a in input().split()]
    print(counter(A))

def counter(A):
    count = -1
    judge = True
    while judge:
        A_ = []
        for a in A:
            if a%2 == 1:
                judge = False
                break
            else:
                A_.append(int(a/2))
        count += 1
        A = A_
    return count

if __name__ == '__main__':
    main()

Solution (Python):
def check_even(i):
  counter = 0
  while i % 2 == 0:
    i /= 2
    counter += 1
  return counter

if __name__ == '__main__':
  N = int(input())
  A = map(int, input().split())

  ans = min(map(check_even, A))
  print(ans)

Solution (Python):
N = int(input())		


if 1 > N or N > 200:
	print('Nは1~200の範囲で指定してください')
	exit()

a = input()			
A = a.split()		


if len(A) != N:	
	print('N個だけ数を入力してください')
	exit()

for i in A:
	if int(i) < 1 or int(i) > 10**9:
		print('Aは1~10^9の範囲で入力してください')
		exit()

count = []
for i in range(0, N):
	x = int(A[i])
	count.append(0)
	while x%2 == 0:	
		count[i]+=1
		x /= 2
print(min(count))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

min = 10000000
for i in range(N):
    c = 0
    while A[i] % 2 == 0:
        c += 1
        A[i] //= 2
    if  c < min:
        min = c
print(min)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
cnt=[]
for i in range(n):
    for j in range(10000):
        if a[i]%2 == 0:
            a[i]=a[i]/2
        else:
            cnt.append(j)

cnt.sort()
print(cnt[0])

Solution (Python):
from itertools import takewhile
from functools import reduce

data_num = int(input())
data_list = [int(num) for num in input().split(' ')]

combine_data = reduce(lambda x, y: x | y, data_list)

results = takewhile(lambda x: x == '0', bin(combine_data)[::-1])

print(len(list(results)))

Solution (Python):
from itertools import takewhile

data_num = int(input())
data_list = [bin(int(num)) for num in input().split(' ')]

results = [takewhile(lambda x: x == '0', data[::-1]) for data in data_list]

print(min([len(list(result)) for result in results]))

Solution (Python):
N = int(input())
a  = [int(i) for i in input().split()]
t = 0
while all(i % 2 == 0 for i in a):
  a = [i / 2 for i in a]
  t = t + 1
print(t)

Solution (Python):
import sys
import numpy
def shift_only(data, num):
    count = 0
    while True:
        if detect_even(data, num):
            count += 1
            data = data / 2
        else:
            break
    return count


def detect_even(data, num):
    if (data % 2 == 0).sum() == num:
        return True
    else:
        return False

if __name__ == "__main__":
    input = sys.stdin.readline
    size = int(input())
    data = numpy.array(list(map(int, input().split())))
    print(shift_only(data, size))

Solution (Python):
def  counter(n):
  cnt =0
  while n%2 ==0 :
    n/=2
    cnt+=1
  return cnt

n=int(input())
a=map(int,input().split())
cnt=min(map(counter,a))
print(cnt)

Solution (Python):
def main():
    n = int(input())
    values = list(map(int, input().split()))
    count = None
    for x in values:
        temp_count = 0
        while x % 2 == 0:
            x /= 2
            temp_count += 1
        count = temp_count if count == None else min(count, temp_count)


    print(count)

def canBeDevide(values, num):
    return all(x % 2 == 0 for x in values)








main()

Solution (Python):
def main():
    n = int(input())
    values = list(map(int, input().split()))
    count = 0
    while canBeDevide(values, 2):
        count += 1
        values = list(map(lambda x: x / 2, values))

    print(count)

def canBeDevide(values, num):
    return all(x % 2 == 0 for x in values)








main()

Solution (Python):
N = input()
A = list(map(int, input().split()))
count = 0
while all(a%2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)

Solution (Python):


n = input()
s = [int(i) for i in input().split()]
ans = 0
while True:
        if [i for i in s if i % 2 == 1]:
                break
        s = [i//2 for i in s]
        ans += 1
print(ans)

Solution (Python):
n = int(input())
int_list = list(map(int, input().split()))
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1
print(count)

Solution (Python):
input()
s=list(map(int,input().split()))
bl = 0
for i in s:
  bl |= i
print(len(bin(bl&-bl))-3)

Solution (Python):
n=input()
a=list(map(int,input().split()))
ans=float("inf")
for i in a:
    x=0
    while i%2==0:
        i=i//2
        x+=1
    ans=min(ans,x)
print(ans)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
cnt=0
while all(x%2==0 for x in l):
    l=list(map(lambda x: x//2,l))
    cnt+=1
print(cnt)

Solution (Python):
n = input()
a = list(map(int, input().split()))
max = 10**9
for i in a:
    c = 0
    if i % 2 == 0:
        while i % 2 == 0:
            i = i/2
            c += 1
    if c < max:
        max = c
        
print(max)

Solution (Python):


N = int(input())

A = input().split()
for i in range(N):
    A[i] = int(A[i])


count=0
flag = True

while flag:
    for i in range(N):
        d = A[i] % 2
        if d != 0:
            flag = False
        else:
            A[i] = A[i]/2
    if flag:
        count+=1
print(count)

Solution (Python):
N = input()
A = map(int, input().split())

ans = 10 ** 9
for a in A:
    x = 0
    while a > 1:
        if a % 2 != 0:
            break
        a //= 2
        x += 1
    ans = min(ans, x)

print(ans)

Solution (Python):
N = input()
x = list(map(int, input().split()))
end = True
count = 0

def div2(y):
    return y / 2

while end:
    for i in x:
        if i % 2 == 1:
            end = False
            break
    else:
        count += 1
        x = list(map(div2, x))
        continue
    break
print(count)

Solution (Python):
N = input()
A = list(map(int, input().split()))
cnt = 0
while all(a%2 == 0 for a in A):
    A = [a/2 for a in A]
    cnt += 1
print(cnt)

Solution (Python):
n=int(input())
A=list(map(int,input().split()))
ans=float("inf")
for a in A:
  count=0
  while a%2==0:
    count+=1
    a//=2
  ans=min(ans,count)
print(ans)

Solution (Python):
N = int(input())
a_list = list(map(int, input().split(' ')))
max_count = 10 ** 9
for i in a_list:
    i, j = divmod(i, 2)
    count = 0
    while j == 0:
        count += 1
        i,j = divmod(i, 2)
    if max_count >= count:
        max_count = count
print(max_count)

Solution (Python):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    b = len(bin(i)) - bin(i).rfind("1") - 1
    ans = min(ans, b)
print(round(ans))

Solution (Python):
n=int(input())
a = list(map(int, input().split()))
count =0
flag = "true"
while flag=="true":
  for k in range(n):
    if a[k]%2==0:
      a[k] //= 2
    else:
      flag = "false"
      break
  count += 1
print(count-1)

Solution (Python):
N = int(input())

s = input().split()
s = [int(c) for c in s]

count = 0
t = 0

while t == 0:
    for i in range(N):
        if s[i] % 2 != 0:
            t = 1
            count -= 1
            break
        else:
            s[i] = int(s[i]/2)
    count += 1
    
print(count)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]

ans = 0
flg = 1
while flg:
    for i in range(N):
        if A[i] % 2:
            flg = 0
            break
        A[i] //= 2
    if flg == 1:
        ans += 1

print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

res = 0
flag = True
while flag:
    for i in range(N):
        if A[i]%2 == 0:
            A[i] = A[i] // 2
        else:
            flag = False
            break
    res += 1
print(res - 1)

Solution (Python):
n = int(input())
A = list(map(int, input().split()))

cnt = 0
flg = True
while flg:
    for i, item in enumerate(A):
        if item % 2 == 0:
            A[i] = int(item / 2)
        else:
            flg = False
            break
    if flg:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = list(i/2 for i in a)
    cnt += 1
print(cnt)

Solution (Python):
n = int(input())
lst = sorted(list(map(int, input().rstrip().split())))
count = 0

while all(i % 2 == 0 for i in lst):
    lst = [i / 2 for i in lst]
    count += 1

print(count)

Solution (Python):
n = input()
a = list(map(int, input().split()))
cnt = 0
while all( i%2 == 0 for i in a):
    a = [i/2 for i in a]
    cnt +=1
print(cnt)

Solution (Python):
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Solution (Python):
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Solution (Python):
n_cnt=int(input())
n=list(map(int,input().split()))
output=-1
flag=True

while flag:
    output+=1
    for i in range(n_cnt):
        if n[i]%2==0:
            n[i]/=2
        else:
            flag=False
            break
print(output)

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]

l=[]

for k in a:
  m=0
  while k%2==0:
    k=k/2
    m +=1
  l.append(m)

print(min(l))

Solution (Python):



N = int(input())
in_list = input().split()

div_list = []
count = 1
times = 0

while count == 1:
    for i in range(N):
        if int(in_list[i])%2 == 0:
            in_list[i] = int(in_list[i])/2
        else:
            count = 0
            break;
    if count == 1:
        times += 1

print(times)

Solution (Python):
num = int(input())
a = list(map(int, input().split()))

carray = []
for i in a:
  c = 0
  while i != 0 and i % 2 == 0:
    i /= 2
    c += 1
  carray.append(c)
print(min(carray))

Solution (Python):
def is_even_list(A):
    for a in A:
        if (int(a) % 2 == 1):
            return False
    return True

def divide_list(A):
    newA = []
    for a in A:
        newA.append(int(a) / 2)
    return newA

N = int(input())
A = input().split()
count = 0

while(is_even_list(A)):
    A = divide_list(A)
    count += 1
print(count)

Solution (Python):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Solution (Python):
_,*a=map(int,open(0).read().split())
c=0
while True:
  if any([e%2>0 for e in a]):
    break
  else:
    c+=1
    a=[e/2 for e in a]
print(c)

Solution (Python):
import numpy as np
N = int(input())
Ss = np.array(list(map(int, input().split())))

count = 0
while 1:
  a = Ss % 2 == 0
  if (a.sum() != Ss.size):
    break
  Ss = Ss/2
  count += 1
print(count)

Solution (Python):
import re

n = int(input())
a = input()
a = re.split(" ",a)

count = 0
ans = 0
while(count == 0):
    for i in range(len(a)):
        if(int(a[i])%2 == 1):
            count = 1
    if(count == 0):
        ans += 1
        for i in range(len(a)):
            a[i] = int(a[i])/2
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



N = ii()
A = lmi()
mincnt = 10e9
for i in A:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i = i//2
    mincnt = min(mincnt, cnt)

print(mincnt)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
tmpA = A
ans = 0
while True:
    tmpA = [a/2 for a in tmpA if a%2==0 and a!=0 ]
    if len(A) == len(tmpA):
        ans+=1
    else:
        print(ans)
        exit()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    n, a, b = LI()
    print(min(n*a,b))
    return


def B():
    a = S()
    print(a.count("1"))
    return


def C():
    n = II()
    a = list(str(n))
    a = list(map(int,a))
    if not n % sum(a):
        print("Yes")
    else:
        print("No")
    return


def D():
    n = II()
    a = LI()
    ans = 0
    while True:
        for i in range(n):
            if a[i] % 2:
                print(ans)
                return    
            a[i] /= 2
        ans += 1
    print(ans)
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    D()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    n,a,b = LI()
    print(min(n*a,b))
    return


def B():
    s = S()
    print(s.count("1"))
    return


def C():
    n = list(map(int, S()))
    k = 0
    s = sum(n)
    for i in range(len(n)):
        k *= 10
        k += n[i]
    if k%s == 0:
        print("Yes")
    else:
        print("No")
    return


def D():
    n = I()
    a = LI()
    ans = float("inf")
    for i in range(n):
        m = 0
        while a[i]%2 == 0:
            m += 1
            a[i] //= 2
        ans = min(m,ans)
    print(ans)
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


def I_():
    return


def J():
    return


if __name__ == "__main__":
    D()

Solution (Python):
N = int(input())
A = eval(input().replace(" ", "|"))
print(str(bin(A))[::-1].find("1"))

Solution (Python):
N = int(input())
*A, = map(int, input().split())

count = 0
while True:
	for i, a in enumerate(A):
		if a % 2:
			print(count)
			exit()
		A[i] //= 2
	else:
		count += 1

Solution (Python):
def generatorDiv(int_list, power_of, exponent):
    for num in int_list:
        yield num//((power_of)**exponent)

n = int(input())
a = list(map(int, input().split()))
counter = 0
gen = generatorDiv(a, 2, counter)

while 1:
    binOR = 0
    for num in gen:
        binOR = binOR | num
    if (binOR & 1) == 0:
        counter += 1
        gen = generatorDiv(a, 2, counter)
    else:
        break;
        
print(counter)

Solution (Python):

n = int(input())
a = [int(x) for x in input().split()]
counter = 0

while 1:
    binOR = 0
    for num in a:
        binOR = binOR | num
    if (binOR & 1) == 0:
        counter += 1
        a = [x//2 for x in a]
    else:
        break;
        
print(counter)

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

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]

ans = 0
flg = True

while flg:
    for i in range(N):
        if A[i] % 2:
            flg = False
            break
        else:
            A[i] >>= 1

    if flg:
        ans += 1

print(ans)

Solution (Python):
N=int(input())
a=list(map(int,input().split()))

ans=10**10

for i in a:
    div_num=0
    while i %2==0:
        i//=2
        div_num+=1
    ans=min(ans,div_num)
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
cnt = 0
while True:
    if [i % 2 for i in A].count(1) > 0:
        print(cnt)
        exit()
    else:
        A = [j // 2 for j in A]
        cnt += 1
print(cnt)

Solution (Python):

count = int(input())
s = input()
num_list = s.split(" ")
new_num_list = []
for i in range(count):
  work = int(num_list[i])
  work_count = 0
  while work%2 == 0:
    work_count = work_count+1
    work = work//2
  new_num_list.append(work_count)
new_num_list.sort()
print(new_num_list[0])

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans_l=[]
for i in range(n):
    num=a[i]
    ctr=0
    while num%2==0:
        ctr+=1
        num=num//2
    ans_l.append(ctr)
print(min(ans_l))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 0

while all(a % 2 == 0 for a in A):
    ans += 1
    for i in range(N):
        A[i] = int(A[i] / 2)

print(ans)

Solution (Python):
N=int(input())
a=[int(i) for i in input().split()]
c=list(range(len(a)))
d=0
for j in range(len(a)):
    while a[j]%2==0:
        d=d+1
        a[j]=a[j]/2
        c[j]=d
    d=0
print(min(c))

Solution (Python):
n=int(input())
A=list(map(int,input().split()))
ans=0
while True:
  count=0
  for i in range(n):
    if A[i]%2==0:
      A[i]=A[i]//2
      count+=1
    else:
      break
  if count==n:
    ans+=1
  else:
    break
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 0

while True:
  exist_odd = False
  for a in A:
    if a % 2 != 0:
      exist_odd = True
  if exist_odd:
    break
  for i in range(N):
    A[i] /= 2
  ans += 1
  
print(ans)

Solution (Python):
N = int(input())
lis = list(map(int, input().split())) 
count = 0
boolean = True
while boolean:
    for i in range(N):
        if lis[i] % 2 == 1:
            boolean = False
            break
        else:
            lis[i] /= 2

    if boolean:
        count +=1

print(count)

Solution (Python):
N = int(input())
num_list = list(map(int, input().split()))
 
ans = 10**10
 
for i in num_list:
  div_num = 0
  while i % 2 == 0:
    i  //= 2
    div_num += 1  
    
  if ans > div_num:
     ans = div_num
print(ans)

Solution (Python):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans

n = int(input())
a = map(int, input().split())
ans = min(map(how_many_times_divisible, a))

print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

a = 0
while True:
    all_even = True
    for i in range(N):
        all_even = all_even and (A[i] % 2 == 0)
    
    if all_even == True:
        for i in range(N):
            A[i] = A[i] / 2
            
        a += 1
            
    else:
        break
    
print(a)

Solution (Python):
num = int(input())
board = list(map(int, input().split()))
evener = 0
ope = True

while True:
    for i in range(num):
        if board[i]%2 == 0:
            board[i] = board[i]/2
        else:
            ope = False
            break
    if ope == True:
        evener+=1
    else:
        break

print(evener)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

ans = 10 ** 9
for i in a:
    count = 0
    while True:
        if i % 2 == 0 and i > 0:
            i >>= 1
            count += 1
        else:
            break
    ans = min(ans, count)
print(ans)

Solution (Python):
n=int(input())
data=list(map(int, input().split()))
for i in range( max(data)):
  even_data = list(filter(lambda x: x%2==0, data))
  if len(even_data) < n:
    print(i)
    break
  data = list(map( lambda x: x / 2,  data))

Solution (Python):
N=int(input())
s=list((int(x) for x in input().split()))
c=0
kaisu=1000
for x in s:
    while x%2==0:
        c=c+1
        x=x/2
    if kaisu>=c:
        kaisu=c
    c=0
print(kaisu)

Solution (Python):
N = int(input())
list = input().split()
ans = 0
is_dev = True
while True:
  for i in range(N):
    list[i] = int(list[i])
    if list[i] % 2 == 1:
      is_dev = False
      break
    list[i] = int(list[i]) / 2

  if not is_dev:
    break
  else:
    ans += 1

print(ans)

Solution (Python):
N = input()
lst = list(map(int,input().split()))

counter = 0
while all([x%2 == 0 for x in lst]):
  counter += 1
  for k in range(int(N)):
    a = lst[k] / 2
    lst[k] = a
    
    

print(counter)

Solution (Python):
import math
n = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
  ans = min(ans, len(bin(i))-bin(i).rfind("1") -1)
print(round(ans))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
cau = 0
flag = True
while flag:
    for i in range(N):
        if A[i] % 2 == 1:
            flag = False
            break        
    if flag:
        for i in range(N):
            A[i] = A[i]/2
        cau += 1
print(cau)

Solution (Python):
import sys
line1, line2 = [sys.stdin.readline() for i in range(2)]
components = [int(i) for i in line2.strip().split()]
count = 0
while all([i % 2 == 0 for i in components]):
    count += 1
    components = [i//2 for i in components]
else:
    print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 0
flag = "go"
while flag == "go":
    for i in range(N):
        if A[i] % 2 != 0:
            flag = "stop"
            break
        
    if flag == "go":
        for i in range(N):
            A[i] = A[i] / 2
        ans = ans + 1
        
print(ans)