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):
from sys import stdin
N=int(stdin.readline().rstrip())
data=[int(x) for x in stdin.readline().rstrip().split()]
ans=[]
for i in data:
    cnt = 0
    while i % 2 == 0:
        i = i / 2
        cnt += 1
    ans.append(cnt)
print(min(ans))

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

ans_list=[]
for j in range(n):
    m=0
    while a[j]%2==0:
        m+=1
        a[j]=a[j]//2
    ans_list.append(m)
ans_list.sort()
print(ans_list[0])

Solution (Python):
n = input()
list = [int(x) for x in input().split()]
count = 0
while True:
    for num in list:
        if not num % 2 == 0:
            print(count)
            break
    else:
        list = [x/2 for x in list]
        count += 1
        continue
    break

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

while True:
    if (any([x % 2 for x in A])):
        break

    A = [x / 2 for x in A]
    count+=1

print(count)

Solution (Python):
n = int(input())
result = 0
for a in input().strip().split():
    result |= int(a)
count = 0
while result:
    if result & 1 == 1:
        print(count)
        break
    result >>= 1
    count += 1

Solution (Python):
_,*a=map(int,open(0).read().split());c=-1
while all(a):c+=1;*a,=map(lambda x:(x//2)*(x%2<1),a)
print(c)

Solution (Python):
n=int(input())
a= [int(x) for x in input().split()]
ans=0
ng=0
while ng==0:
	for i in range(len(a)):
		if a[i]%2!=0:
			ng=1
			break
	if ng==0:
		for i in range(len(a)):
			a[i]/=2
		ans+=1

print(ans)

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

Solution (Python):
input()
n=eval(input().replace(' ','|'))
print(len(bin(n&-n))-3)

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

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

for i in range(0,N):
  m=0
  while A[i]%2==0:
    A[i]=A[i]/2
    m+=1
  A[i]=m
print(min(A))

Solution (Python):
row = int(input())
number = list(map(int,input().split()))

count = 0
flg = 0

while flg == 0:
  for i in range(row):
    if number[i] % 2 == 1:
    	flg = 1
    	break
    else:
      number[i] = number[i] / 2
  count += 1

print(count-1)

Solution (Python):

n=int(input())
a=list(map(int,input().split()))
countlist=[]

for x in range(n):
    count=0
    while a[x]%2==0:
        a[x]=int(a[x]/2)
        count=count+1
    countlist.append(count)

print(min(countlist))

Solution (Python):
def pdw(n):
    i=2
    t=[]
    ta = t.append
    while i*i<=n:
        while n%i==0:
            n//=i
            ta(i)
        i+=1
    if n>1:ta(n)
    return t.count(2)
N = int(input())
print(min([pdw(c) for c in list(map(int,input().split()))]))

Solution (Python):
count = 0
n = int(input())

def judge(a):
    ans = True
    for ai in a:
        if ai % 2 != 0:
            ans = False
            break
    return ans

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

while judge(a):
    for (i, ai) in enumerate(a):
        a[i] = ai / 2
    count += 1

print(count)

Solution (Python):
count = 0
n = int(input())

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

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

print (count)

Solution (Python):
num1 = int(input())
list1 = [int(i) for i in input().split()]

count1 = 0
flag1 = False

while flag1 == False:
    for index in range(num1):
        if list1[index] % 2 == 0:
            list1[index] = list1[index]/2
            if index == num1-1:
                    count1+=1
        else:
            flag1 = True
            break

print(str(count1))

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

ans = 30
cnt = 0
for i in range(N):
    p = A[i]
    while p % 2 == 0 and cnt < ans:
        p = p / 2
        cnt += 1
    else:
        ans = cnt
        cnt = 0
print(ans)

Solution (Python):
n = int(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(ans)

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

def includeOdd(l):
    ans = False
    for i in range(n):
        if l[i] % 2 == 1:
            ans = True
    return ans


while True:
    if includeOdd(li):
        break
    li = [x / 2 for x in li]
    count += 1
    
print(count)

Solution (Python):
import sys

num = input()
n_list = list(int(i) for i in input().split())
count = 0

while True:
  for index, n in enumerate(n_list):
    if n % 2 == 1:
      print(count)
      sys.exit()
    n_list[index] = n / 2
  count += 1

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
list = [int(x) for x in stdin.readline().rstrip().split()]

result = -1
flag = 1
while(flag == 1):
  for i in range(0, N):
    if(list[i]%2==0):
      list[i] = list[i] / 2
    else:
      flag = 0
  result += 1

print(result)

Solution (Python):
def count_two_div(num: int):
    count = 0
    while True:
        if num % 2 == 0:
            count += 1
            num /= 2
        else:
            break
    return count


if __name__ == '__main__':
    n = int(input())
    c = list(map(int, input().split()))
    div_count_list = list(map(count_two_div, c))
    print(min(div_count_list))

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
l = []
def wari(b):
    count = 0
    while b % 2 == 0:
        count = count + 1
        b = b / 2
    return count
for i in range(n):
    x = a[i]
    ans = wari(x)
    l.append(ans)
print(min(l))

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):

x = int(input())
y = input()
z = y.split(" ")
black = [int(s) for s in z]
cnt = 0
count = 0
while True:
    for i in range(x):
        if(black[i] % 2 == 0):
            cnt += 1
    if(cnt == x):
        cnt = 0
        count += 1
        for i in range(x):
            black[i] = black[i] / 2
    else:
        print(count)
        break

Solution (Python):

N=int(input())
l=list(map(int,input().split()))


c=0


f=False

while True:
  
  for i in range(len(l)):
    if l[i]%2==0:
      l[i]//=2
    else:
      
      f=True
      break
  
  c+=1

  
  
  if f:
    c-=1
    break


print(c)

Solution (Python):
N = int(input())
a = [int(x) for x in input().split()]
b = 0
while len(list(filter(lambda i : i % 2 != 0, list(a)))) == 0 :
    a = list(map(lambda x: x/2, a))
    b += 1
print(b)

Solution (Python):
n = int(input())
li = input().split()
li = [int(s) for s in li]
l=len(li)

count = 0
flag = 1

while True:
    if flag == 1:
        for n in range(l):
            if li[n]%2 == 0:
                li[n] /= 2
            else:
                flag -= 1
                break
        if flag == 1:
            count += 1
                    
    elif flag == 0:
        break
        
print(count)

Solution (Python):
def is_all_even(seq):
    for i in seq:
        if i % 2 != 0:
            return False
    return True


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

ans = 0
while is_all_even(A):
    A = [a // 2 for a in A]
    ans += 1
print(ans)

Solution (Python):
def is_even_all(nums):
    """
    偶数判定
    :param nums:Int型のList
    :return: 判定結果(Boolean型)
    """
    for i in nums:
        if i % 2 != 0:
            return False

    return True


def divide_by_2(num):
    """
    :param num: 数値(Int型)
    :return: 計算結果
    """
    return int(num / 2)


input()

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


operate_count = 0
can_operate = is_even_all(num_list)

while can_operate:
    operate_count += 1
    num_list = list(map(divide_by_2, num_list))

    can_operate = is_even_all(num_list)

print(operate_count)

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

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

answer = 0
isExsistOdd = False

while True:
    for i in S:
        if i % 2 != 0:
            isExsistOdd = True
            break
    if isExsistOdd:
        break
    for i in range(N):
        S[i] /= 2
    answer += 1

print(answer)

Solution (Python):
input()

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

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

print(ans)

Solution (Python):
n = input()
num = [int(i) for i in input().split()]
count = 0
end=False
while(True):
	div = []
	for i in num:
		if(i % 2 == 0):
			div.append(i/2)
		else:
			print(count)
			end = True
			break
	if(end == True):
		break
	num = div
	count = count + 1

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

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

ans=100
for i in a:
  ans=min(ans,Count(i))
print(ans)

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

min = 10**9
for a in A:
  s = bin(a)
  for k in range(len(s)):
    if s[-k]=='1':
      temp_min = k-1
      break
  if temp_min < min:
    min = temp_min
    
print("{}".format(min))

Solution (Python):
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))

ans = 0
while all (ai % 2 == 0 for ai in a):
    a = [ai/2 for ai in a]
    ans += 1

print(ans)

Solution (Python):
n = input()
v = list(input().split())

cnt = 0
flg = True
while flg:
  for i in range(len(v)):
    if int(v[i]) %2 == 0:
      pass
    else:
      flg = False
    v[i] = int(v[i])/2
  cnt = cnt + 1

print(cnt - 1)

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

count = 0
while True:
    for i in range(n):
        if A[i]%2==1:
            print(count)
            exit()
        A[i] = A[i]/2
    count += 1

print(count)

Solution (Python):
n = int(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 = int(input())

a = input().split()

A = [int(s) for s in a]   


Time = 0
i = 0


while i < N:
	if A[i] % 2 == 0:
		i += 1

		if i == N:
			for j in range(N):
				A[j] = A[j] / 2
			
			Time += 1
			i = 0

	elif A[i] % 2 == 1:
		break

	
	

print(Time)

Solution (Python):
import numpy as np
n = int(input())
a = np.array(list(map(int,input().split())))
cnt  = 0
while np.all(a % 2 == 0):
    a = a / 2
    cnt +=1
print(cnt)

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

Solution (Python):
n = int(input())
lis = list(map(int,input().split()))
y = 0
while True:
    x = 0
    for i,v in enumerate(lis):
        j = v/2
        lis[i] = j
        if j.is_integer():
            x += 1
    if not x == n:
        break
    y += 1

print(y)

Solution (Python):
_ = input()
l = list(map(int,input().split()))
mn = 99999
for i in l:
  count = 0
  while True:
    if i %2 ==0:
      count +=1
      i = int(i/ 2)
    else:
      break
  if mn > count:
    mn = count
print(mn)

Solution (Python):
def main():
    N = int(input())
    A = [int(_) for _ in input().split(" ")]

    counter = 0
    loop_flag = True

    while loop_flag:
        num_counter = 0
        for i in range(N):
            if A[i]%2 == 0:
                A[i] = A[i]/2
                num_counter += 1
            else:
                loop_flag = False

        if num_counter == N:
            counter += 1

    print(counter)

main()

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

A = np.array(A)

cnt = 0

while True:
    if (A%2).sum() == 0:
        A = A/2
        cnt += 1
    else:
        break
print(cnt)

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

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

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

    answer = 0
    for i in range(max(A)):
        is_all_even = True
        for a in A:
            if a % 2 != 0:
                is_all_even = False
                break
        if is_all_even == True:
            answer += 1
            A = list(map(lambda x:int(x / 2), A))
        else:
            break
    print(answer)

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

Solution (Python):
from sys import stdin

N = int(input())
A = [int(x) for x in stdin.readline().rstrip().split()]

cnt = 0

for a in A :
    if a % 2 != 0 :
        break
    else:
        c = 0
        while a % 2 == 0 :
            c = c + 1
            a = a / 2
        
        if cnt == 0 or cnt > c :
            cnt = c
    

print(int(cnt))

Solution (Python):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
cnt = 0
flg = True
while flg:
    if np.all(A % 2 == 0):
        cnt += 1
        A = A / 2
    else:
        flg = False
print(cnt)

Solution (Python):
N = int(input())
x = list(map(int, input().split()))
mn_lst = []
for i in x:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i >>= 1
    mn_lst.append(cnt)
    
print(min(mn_lst))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(1,30):
    count = 0 
    for j in a: 
        if j%2**i == 0:
            count += 1
    if count == n:
        ans +=1  
print(ans)

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

ans = 10**10

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

Solution (Python):

N = int(input())
data = list(map(int, input().split()))

def div(n):
    count = 0
    while n %2 == 0:
        n /= 2
        count += 1
    return count

ans = min(list(map(div, data)))
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split(' ')))
cnt = 0
while sum(x%2==0 for x in a) == n:
    a = list(map(lambda x: x / 2 if x % 2 == 0 else x, a))
    cnt += 1
print(cnt)

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

def div_num(n):
  ans = 0
  while n % 2 == 0:
    n /= 2
    ans += 1
  return ans

answer = min(list(map(div_num, a)))
print(answer)

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

answer = 0
while True:
  for i in A:
    if i % 2 != 0:
      break
  else:
    answer += 1
    A = [int(a/2) for a in A]
    continue
  break

print(int(answer))

Solution (Python):
N=int(input())
A=[int(i) for i in input().split()]
x=[0]*N
a=True
while a:
    for i in range(N):
        if A[i]%2==0:
            A[i]/=2
            x[i]+=1
        else:
            a=False
    
print(min(x))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
x=0
for i in a:
    x = x|i
x=bin(x)
cnt = 0
while(1):
    if x[-1-cnt] == '0':
        cnt += 1
    else:
        break
print(cnt)

Solution (Python):
N = input()
data = list(map(lambda x :int(x),input().strip().split()))
data.sort()
tmp = data[0]
cnt =0
while tmp >1:
    if sum(list(map(lambda x:x%(2**(cnt+1)), data))) >= 1:break
    tmp//=2
    cnt+=1
print(cnt)

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

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

print(count)

Solution (Python):
N = int(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):
def ipt(N=0,switch=0):
    if N == 0:
        return list(map(int,input().split()))
    else:
        if switch==0:
            return [list(map(int,input().split())) for _ in range(N)]
        else:
            return [int(input()) for _ in range(N)]

N=int(input())
A=ipt()
min=4**9
for i in range(N):
    cnt=0
    while(A[i]%2==0):
        A[i] = A[i]//2
        cnt += 1
    if min > cnt:
        min=cnt
print(min)

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

Solution (Python):
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    As = [int(x) for x in stdin.readline().rstrip().split()]
    count = 0
    while True:
        As = [x // 2 for x in As if x % 2 == 0]
        if len(As) == N:
            count += 1
            continue
        break
    print(count)


if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np
s = input()
arr = list(map(int, input().split()))
count = 0
while True:
  if all(map(lambda x: x%2==0, arr)):
    arr = [i/2 for i in arr]
    count += 1
  else:
    break  
print(count)

Solution (Python):
def main():
    _ = int(input())
    A = map(int, input().split())
    ans = float('INF')
    for a in A:
        c = 0
        while a % 2 == 0:
            a //= 2
            c += 1
        ans = min(ans, c)
    print(ans)


main()

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

cnt = 0

while True:
    flag = False
    for i in A:
        if i % 2 != 0:
            flag = True
    
    if flag:
        break

    for i in range(len(A)):
        A[i] /= 2
        
    cnt += 1
    
print(cnt)

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

Solution (Python):
tar_len = input()
targets = map(int, input().split())

def how_many_times_divisible(elem):
    count = 0
    while True:
        if elem % 2 != 0: break
        count += 1
        elem = elem / 2
    return count

count = min(map(how_many_times_divisible, targets))
print(count)

Solution (Python):
tar_len = input()
targets = list(map(int, input().split()))

count = 0

while True:
    exist_odd = False
    for target in targets:
        if target%2 != 0:
            exist_odd = True
    if exist_odd: break
    count += 1
    targets = list(map(lambda x: x/2, targets))
    
print(count)

Solution (Python):
n = int(input())
num_list = [int(x) for x in input().split()]
cnt = 0
flag = False
while flag != True:
    for i in num_list:
        if i % 2 != 0:
            flag = True
        
    if flag:
        print(cnt)
        break
    
    for j in range(len(num_list)):
        num_list[j] = num_list[j] / 2
    
    cnt+=1

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

exec_count = 0

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

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

Solution (Python):
n = int(input()) 
print(min([bin(int(i))[::-1].find("1") for i in input().split()]))

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

res = float("inf")
for a in A:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1
    res = min(res, cnt)

print(res)

Solution (Python):
import sys

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

count = 0
while True:
    for val in a:
        if val%2 != 0:
            print(count)
            sys.exit()

    for i in range(n):
        a[i] /= 2

    count += 1

print(count)

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

cnt = 0

while True:
  if all([i % 2 == 0 for i in A]):
    A = [i / 2 for i in A]
    cnt += 1
  else:
    break

print(cnt)

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

T = True
cnt = 0

while True:
  if all([i % 2 == 0 for i in A]):
    A = [i / 2 for i in A]
    cnt += 1
  else:
    break

print(cnt)

Solution (Python):
import numpy as np

N = int(input())
num_list = np.array(list(map(int, input().split())))

count = 0
while np.all(num_list % 2 == 0):
    count += 1
    num_list = num_list / 2

print(count)

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
flg = True
cnt = 0
while 1:
    for val in A:
        if val % 2 != 0:
            flg = False
    if flg:
        A = list(map(lambda x: x // 2, A))
        cnt += 1
    else:
        print(cnt)
        exit()

Solution (Python):
_,t=open(0);n=eval(t.replace(' ','|'));print(len(bin(n&-n))-3)

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

Solution (Python):

num = int(input())
lst = list(map(int, input().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=int(input())
a=list(map(int,input().split()))
D=0
k=1
while k>=0:
 for i in range(n):
  if a[i]%2**k==0:
    D+=1
 if D==n:
    k+=1
    D=0
 else:
  print(k-1)
  break

Solution (Python):
import numpy as np

N = int(input())
A = list(map(int, input().split()))
B = np.array(A)

ans = 0

while not np.any(B%2):
    B //= 2
    ans += 1
    
print(ans)

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

Solution (Python):



n = int(input())
a = list(map(int, input().split()))
r = [0] * n

for i in range(n):
    while a[i] % 2 == 0:
        a[i] /= 2
        r[i] += 1

print(min(r))

Solution (Python):
N = int(input());
A = [int(a) for a in input().split()]
r = 0;
while (r < 100):
    if (not all([a % 2 == 0 for a in A])):
        break;
    A = [a / 2 for a in A]
    r += 1
print(r)

Solution (Python):
n = int(input())
idx = list(map(int, input().split()))
result, temp = 0, idx
while True:
    if sum([i % 2 == 0 for i in temp]) == n:
        temp = [i / 2 for i in temp]
    else:
        break
    result += 1
print(result)

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


if __name__ == "__main__":
  main()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
num = 0
for i in range(len(A)):
    num = num | A[i]
cnt = 0
for i in range(50):
    if not (num >> i) & 1:
        cnt += 1
    else:
        break
print(cnt)

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

ans=0
for i in range(30):
    a=[a[j]/2 for j in range(n) if a[j]%2==0]
    ans+=1
    if len(a)!=n:
        break

print(ans-1)

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

i = 0; count = 0
while True:
        
    if A[i] % 2 > 0:
        break

    elif i < (N-1):
        A[i] = int(A[i] / 2)
        i+=1    
    else:
        A[i] = int(A[i] / 2)
        i=0
        count+=1
        
print(count)

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

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

print(ans)

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

b = int(input(""))
c = map(int, input("").split())
d = min(map(a, c))
print(d)

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def cnt0(n):
    return 0 if n&1 else 1 + cnt0(n//2)

def solve():
    n = f()
    a = f()

    min0 = int(1e9)

    for i in a:
        min0 = min(min0, cnt0(i))
    
    print(min0)

solve()

Solution (Python):
from functools import reduce
from operator import or_

N=int(input())
a=reduce(or_, map(int, input().split()))

c = 0
while (a >> c) & 1 == 0:
	c += 1

print(c)

Solution (Python):
data = [input() for x in range(0, 2, 1)]

num = [int(x) for x in data[1].split(" ")]

flag = 0
cnt = 0

while flag == 0:
  
  
  for i in range(0, len(num), 1):
    if num[i] %2 == 0:
      pass
    else:
      flag = 1
      
  if flag == 1: break
        
 
  for i in range(0, len(num), 1):
    num[i] = num[i] / 2
      
  cnt += 1
    
print(cnt)

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

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

Solution (Python):
import sys
 
size = int(input())
a = list(map(int, input().split()))
cnt = 0
 
while True:
  for i in range(size):
    if(a[i]%2 == 1):
      print(cnt)
      sys.exit()
    
  a = list(map(lambda x:x/2, a))
  cnt+=1

Solution (Python):
import sys

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

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()

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

    min = 1000000000
    for idx in range(0, len(a)):
        count = 0
        while(a[idx] % 2 == 0):
            a[idx] /= 2
            count += 1

        if count < min:
            min = count

    print(min)

if __name__ == "__main__":
    main()

Solution (Python):
N=int(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 = int(input())
li = list(map(int,input().split()))
 
lians = [0]*n
for i in range(n):
  while li[i]%2 == 0:
    li[i] /= 2
    lians[i] += 1
print(min(lians))

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

count = -1
flag = True

while flag == True:
    count += 1
    for i in range(N):
        if A[i]%2 == 0:
            A[i] /= 2

        else:
            flag = False
            break



print(count)

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

count=-1
while len(A)==N:
    count+=1
    for i in range(N):
        if A[i]%2==0:
            A[i]=A[i]/2
        else:
            A.remove(A[i])
            break
print(count)

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

count=-1
while len(A)==N:
    count+=1
    for i in range(N):
        if A[i]%2==0:
            A[i]=A[i]/2
        else:
            A.remove(A[i])
            break
print(count)

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

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

print(cnt)

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

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

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

cnt = 0
while True:
    for i in range(len(A)):
        if A[i] % 2 != 0:
            break 
    else:
        A = [a/2 for a in A]
        cnt += 1
        continue
    break 

print(cnt)

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

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


count = 0

def div(l):
    for i in range(len(l)):
        l[i] = l[i]/2

    return l

def checkOdd(l):
    for num in l:
        if num % 2 == 1:
            return True

    return False


while 1:
    if checkOdd(l) == True:
        break

    l = div(l)
    count = count + 1


print(count)

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

flg = False
cnt = 0

while True :

    for num in a :
        if int(num) % 2 == 0:
            pass
        else :
            flg = True
            break
    if flg == True :
        break

    for num in range(n) :
        a[num] = a[num] / 2

    cnt += 1

print(cnt)

Solution (Python):
n = int(input())
a = sorted(list(map(int, input().split())))
count = 0
while a[0]%2 == 0:
    for i, x in enumerate(a):
        if x%2 == 0:
            a[i] = x//2
        else:
            print(count)
            exit()
    count += 1
print(count)

Solution (Python):
input()
A = list(map(int, input().split()))
flag = True
cnt = 0

for j in range(999999):
  for i in A:
    if i % 2 != 0:
      flag = False
  if flag:
    A = [a/2 for a in A]
    cnt += 1
  else:
    break
print(cnt)

Solution (Python):
input()

A = list(map(int, input().split(" ")))
B = 0

while all(a%2 == 0 for a in A):
  A = [a/2 for a in A]
  B += 1

print(B)

Solution (Python):
input()

A = list(map(int, input().split(" ")))
B = 0

while all(a%2 == 0 for a in A):
  A = [a/2 for a in A]
  B += 1
  
print(B)

Solution (Python):
input()

import numpy as np
A = np.array(list(map(int, input().split(" "))))
a = 0

while np.sum(A%2) == 0:
  A = A/2
  a = a + 1

print(a)