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 = int(input())
l = list(map(int,input().split()))

j = 0
new = []
while True:
    for m,i in enumerate(l):
        if i % 2 == 0:
            l[m] = i/2
            
            if m+1 == n:
                j +=1
        else:
            print(j)
            break
    else:
        continue
    break

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

number = input()
number = [int(x) for x in number.split(" ")]

def two(number,num,flag):
  for i in range(num):
    if number[i] % 2 !=0:
      flag = False
    number[i] /= 2

  return number,flag

flag = True
count = 0
while flag:
  number , flag =two(number,num,flag)
  if flag == True:
    count += 1
 

print(str(count))

Solution (Python):
import functools
n = input()
v = functools.reduce(lambda x, y: x | y, map(int, input().split()))
cnt = 0
while v & 1 == 0:
    v >>= 1
    cnt += 1
print(cnt)

Solution (Python):
def dividable(N,A):
    wareru = True
    for i in range(N):
        if A[i] % 2 != 0:
            wareru = False
            break
    return wareru

def divide(N,A):
    for i in range(N):
        A[i] = A[i] // 2
    return A


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

times = 0

while dividable(N,A):
    A = divide(N,A)
    times += 1

print(times)

Solution (Python):
def dividable(N,A):
    wareru = True
    for i in range(N):
        if A[i] % 2 != 0:
            wareru = False
            break
    return wareru

def divide(N,A):
    for i in range(N):
        A[i] = A[i] // 2
    return A


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

times = 0

while dividable(N,A):
    divide(N,A)
    times += 1

print(times)

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

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

print(count)

Solution (Python):


def main():
    N = int(raw_input())
    A = map(int, raw_input().split(" "))
    retval = 1e9
    for a in A:
        cnt = 0
        while a % 2 == 0:
            a /= 2
            cnt += 1
        retval = min(cnt, retval)
    print retval

if __name__ == '__main__':
    main()

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

while True:
    if A[0] % 2 == 1:
        break
    
    A[0] //= 2
    result += 1

for i in range(1, N):
    if result == 0:
        break
    
    counter = 0
    
    for j in range(result):
        if A[i] % 2 == 1:
            break
        
        A[i] //= 2
        counter += 1

    result = min(result, counter)

print(result)

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

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

Solution (Python):
from functools import reduce
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

def gcd_list(nums):
    return reduce(gcd, nums)

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

gcd_num = gcd_list(A)
ope = 0
while 1:
    if gcd_num % 2 == 0:
        ope += 1
        gcd_num /= 2
    else:
        break
print(ope)

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

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

Solution (Python):
N = int(input())
numbers = list(map(int, input().split()))
times = []
for num in numbers:
    tmp = 0
    while num % 2 == 0:
        num /= 2
        tmp += 1
    times.append(tmp)

print(min(times))

Solution (Python):
def f(n):
  c = 0
  while n & 1 == 0:
    c += 1
    n >>= 1
  return c

input()
a = map(int, input().split())
print(min(f(x) for x in a))

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
counter = 0
b = 1
while b == 1:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
        else:
            b = 0
    counter += 1

print(counter-1)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a = [str(bin(i)) for i in a]
cnt = 1
flg = False
while True:
    for i in a:
        if i[-cnt] == '1':
            flg = True
            break
    if flg == True:
        break
    cnt += 1
print(cnt-1)

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

while all(map(lambda N: N%2==0, A)):
    A = list(map(lambda N: int(N/2), A))
    cnt +=1

print(cnt)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
x = 0
y = "Owarunjane-zo"
while True:
    for i in range(len(A)):
        if A[i] % 2 == 0:
            A[i] = A[i] / 2
        else:
            y = "OwaOwaRi"
    if y == "OwaOwaRi":
        break
    else:
        x += 1
print(x)

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

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

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

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

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

while(True):
    odd = False
    for i in range(0,n):
        if a[i]%2==1:
            odd = True
    if(odd):
        break
    for i in range(0,n):
        a[i] /= 2 
    count += 1


print(count)

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

count = 0
while all([x % 2 == 0 for x in xs]):
    xs = [x >> 1 for x in xs]
    count = count + 1
print(count)

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

count = 0
while True:
    if any([x for x in xs if x % 2 == 1]):
        break
    else:
        xs = [x >> 1 for x in xs]
    count = count + 1
print(count)

Solution (Python):
from sys import stdin


def main() -> None:
    n = next_int()
    ans = 10 ** 9

    for i in range(n):
        a = next_int()
        ans = min(ans, calc(a))
    print(ans)


def calc(a: int) -> int:
    result = 0
    while a % 2 == 0:
        result += 1
        a //= 2
    return result


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Solution (Python):


n = int(input())

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

j = 0
flag = True
while flag:
  for i in range(0,n):
    if l[i]%2 == 1:
      flag=False
      break
    l[i]=l[i]/2
  if flag:
    j = j + 1
print(j)

Solution (Python):

a = int(input())

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

c = len(b)
d = 0


while c == len(b):
  c=0
  for i in b:
    if i %2 == 0:
      c +=1
  if(c == len(b)):
    d += 1
    b = [i/2 for i in b]
print (d)

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

Solution (Python):
num=int(input())
line=list(map(int,input().split()))
n=0
a=0
for i in range(50):
    for i in range(num):
        if line[i]%2==1:
            n+=1
            
    if n==0:
         for i in range(num):
             line[i]=(line[i]//2)
         a+=1
    elif n!=0:
        
        break
    
print(a)

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

Solution (Python):
def CheckEven(N):
    n = len(N)
    flag = True
    for i in range(n):
        flag = (N[i]%2==0)*flag
    return flag

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

count = 0
while(CheckEven(N)):
    for i in range(n):
        N[i] = N[i]/2
    count = count + 1
print(count)

Solution (Python):
import numpy as np
n=int(input())
A=list(map(int,input().split()))
cnt=0
x=0
while(A[x]%2==0):
    if(A[x]%2==0):
        A[x]/=2
        if(x==n-1):
            cnt+=1
            x=0
    else:
        break
    x+=1
        
print(cnt)

Solution (Python):

n = int(input());
a = list(map(int, input().split(' ')));
result = 0;
while all(map(lambda n: n%2==0, a)):
    a = list(map(lambda n: int(n/2), a));
    result +=1;

print(result);

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

def percent_2(x):
	x = x % 2
	return x

def slash_2(x):
	x = x / 2
	return x
ans = 0

for i in range(10000000000000000):
	if sum(list(map(percent_2, A))) == 0:
		ans += 1
		A = list(map(slash_2, A))
	else:
		break
print(ans)

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

Solution (Python):
def pow2(x):
    if x % 2 == 0:
        return 1 + pow2(int(x / 2))
    else:
        return 0

input()
print(min([pow2(int(_)) for _ in input().split()]))

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()))
b = []
c = 0
for i in range(n):
  while a[i] % 2 == 0:
    a[i] /= 2
    c += 1
  b.append(c)
  c = 0
print(min(b))

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

Solution (Python):

N = int(input())

a = input().split()

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

counter = 0

i = 0
while i <= N-1: 
 	if A[i] % 2 == 0 and i < N-1:
 		i += 1
 		continue
 	elif A[i] % 2== 0 and i == N-1:
 	     	i  = 0
 	     	counter += 1
 	     	for j in range (N):
 	     		A[j] = A[j] // 2
 	     	else:
 	     	    continue 
 	else:
 		break




print(counter)

Solution (Python):
def b_shift_only(N, A):
    
    
    bitwise_or = 0
    for a in A:
        bitwise_or |= a
    
    ans = 0
    while bitwise_or % 2 == 0:
        bitwise_or //= 2
        ans += 1
    return ans

N = int(input())
A = [int(i) for i in input().split()]
print(b_shift_only(N, A))

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

res = []
for a in A:
    for i in range(200):
        if a % 2 != 0:
            break
        a = a // 2
    res.append(i)

print(min(res))

Solution (Python):
def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))

def waru(N):
    ans = 0
    while(True):
        if N % 2 == 0:
            ans += 1
            N = N // 2
        else:

            return ans

n = getN()
nums = getList()

ans = 2000000000
for num in nums:
    d = waru(num)
    if d < ans:
        ans = d

print(ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
P = [2**i for i in range(30)]
P = sorted(P,reverse = True)
ans = 100
for i in range(N) :
    for j in range(len(P)) :
        if A[i] % P[j] == 0 :
            ans = min(ans,29-j)
            break
print(ans)

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
a = list(li())

print(min([bin(ai)[::-1].index("1") for ai in a]))

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

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

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

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

B=[bin(A[i]) for i in range(N)]

ANS=1000

for i in range(N):
    count=0
    for j in range(1,100):

        if B[i][-j]=="0":
            count+=1
        else:
            break

    

    if ANS>count:
        ANS=count



print(ANS)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
ans = 999
for a in A:
    ans = min(ans, bin(a)[::-1].index('1'))
print(ans)

Solution (Python):
def ninonjou(x):
    if x%2:
        return 0
    else:
        return 1+ninonjou(x/2)

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

print(min((ninonjou(_) for _ in a)))

Solution (Python):
def divide_2(n):
    i = 0
    while 1:
        if n % 2 == 0:
            n /= 2
            i += 1
        else:
            return i

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

ans = 201
for i in A:
    i_div2 = divide_2(i)
    if i_div2 < ans:
        ans = i_div2

print(ans)

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


while True:
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = int(A[i]/2)
            count += 1
    else:
        if count == N:
            Ans += 1
            count = 0
        elif count != N:
            break

print(Ans)

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

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

Solution (Python):

from sys import stdin

n = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]
ans = 0
go = False

while go == False:
    for i in range(n):
        if a[i] % 2**ans:
            print(ans - 1)
            go = True
            break
    ans += 1

Solution (Python):
N = int(input())
A = [int(i) for i in 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 = list(map(int, input().split()))

n_division = 0
while True:
    a_list = [a/2 for a in a_list if a % 2 == 0]
    if len(a_list) != n:
        print(n_division)
        exit()
    else:
        n_division += 1

Solution (Python):
N=int(input())
A=map(int,input().split())
B=[]
for i in A:
    ans=-1
    while i%1==0:
        i/=2
        ans+=1
    B.append(ans)
print (min(B))

Solution (Python):
def answer(in0, in1):

    N = int(in0)
    A = [int(a) for a in in1.split()]

    cnt = 0

    while (True):
        for i in range(N):
            a = A[i]
            if a % 2 != 0:
                print(cnt)
                return
            A[i] = int(a / 2)
        cnt += 1


answer(input(), input())

Solution (Python):
N=int(input())
ans=0
A=[int(i) for i in input().split()]
flag=True
while True:
    for i in range(N):
        if A[i]%2==0:
            A[i]/=2

        else:
            flag=False
            break
    if flag==False:
        break  
    else:
        ans+=1
            
print(ans)

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

Solution (Python):
n=int(input())
a=input().split()
a=list(map(int,a))
for j in range(1000000000):
    count=0
    for i in range(n):
        if a[i]%2!=0:
            break
        if a[i]%2==0:
            a[i]=a[i]/2
            count+=1
    if count!=n:
        break        
print(j)

Solution (Python):

'''

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


n=int(input())
ans=99999999
for x in map(int,input().split()):
    count=0
    while x%2==0:
        x//=2
        count+=1
    ans=min(ans,count)
print(ans)

Solution (Python):

from math import log2
n=int(input())
a=list(map(int,input().split()))
ans=0
while True:
    for i in range(len(a)):
        if a[i]%2==0:
            a[i]//=2
        else:
            print(ans)
            exit()
    ans+=1

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

ans = []

for a in A:
    count = 0
    while a%2 == 0:
        a /= 2
        count += 1
    ans.append(count)

print(min(ans))

Solution (Python):
import fractions
import functools
N = int(input())
A = list(map(int,input().split()))
gcd = functools.reduce(fractions.gcd,A)
count = 0
while gcd % 2 == 0:
  gcd /= 2
  count += 1
print(count)

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

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

min = 10**10
for e in A:
    m=0 
    while e%2==0:
        e = e/2
        m+=1
    if min>m:
        min = m
print(min)

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


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

print(count)

Solution (Python):
N = int(input())
s = input().split()
A = []
for i in range(N):
    A.append(int(s[i]))
sum = 0
while True:
    flg = True
    for i in range(len(A)):
        if A[i] % 2 == 1:
            flg = False
            break
        else:
            A[i] = A[i] / 2
    if flg:
        sum += 1
    else:
        break
print(sum)

Solution (Python):
from sys import stdin
import numpy as np


N = str(stdin.readline().rstrip())
As = np.array([int(i) for i in stdin.readline().rstrip().split()])
i = 0
while np.sum(As % 2) == 0:
    i += 1
    As = As / 2

print(i)

Solution (Python):


n = int(input())
a = []

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

cnt = 0
for i in range(1000000000000):
    flag = 0
    for j in a:
        if j%2 != 0:
            flag = 1
            break

    if flag == 1:
        cnt = i
        break

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

print(cnt)

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 = int(input())
A = list(map(int,input().split()))
ans = 0
while True:
    if all([x % 2 == 0 for x in A]) == False:
        break
    A = list(map(lambda x: round(x / 2), A))
    ans += 1
print(ans)

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

for i in range(n):
    list[i] = int(list[i])
    i = i + 1

div = [0]*n

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

k = 0
ans = div[0]

for k in range(n):
    if k == n-1:
        break
    
    elif ans > div[k + 1]:
        ans = div[k + 1]
        k = k + 1

print(ans)

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

def judge(A_list):
  if 1 in A_list:
    return(False)
  else:
    return(True)
A_01 = list(map(lambda x: x%2, A))
A_list = list(map(lambda x: x/2, A))
count = 0
while judge(A_01):
  count += 1
  A_01 = list(map(lambda x: x%2, A_list))
  A_list = list(map(lambda x: x/2, A_list))
print(count)

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


print(count)

Solution (Python):
import sys
def main():
    n = int(input())
    a = list(map(int, input().split()))
    i = 0
    while(True):
        for x in a:
            if x%2!=0:
                print(i)
                sys.exit()

        a = [x//2 for x in a]
        i += 1

if __name__=="__main__":
    main()

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

answer = 0
flg = 0
while 1:
	for i in range(len(A)):
		if A[i] % 2 == 0:
			A[i] = A[i]//2
		else:
			flg = 1
			break
	if flg == 1:
		break
	else:
		answer+=1
print(answer)

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

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

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

flag = 0
count = 0

while True:
    for i in range(len(a)):
        if a[i] % 2 == 1:
            flag = 1
            break
        else:
            a[i] = a[i] //2
    
    if flag == 1:
        break

    count += 1


print(count)

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

flag =1
count=0
while flag:
    flag =0
    index=0
    while index < len(listA):
        if listA[index]%2==0:
            listA[index]/=2
            index+=1
        else:
            break
    if index== len(listA):
        count+=1
        flag=1

print(count)

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

while True:
  i = 0
  flag = 0
  while i < N:
    if A[i]%2 == 1:
      flag = 1
    else:
      A[i] = A[i]/2
    i += 1
  if flag == 1:
     print(count)
     break
  count += 1

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

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

print(count)

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

Solution (Python):
def half(xs):
    count = 0
    while True:
        for i in range(len(xs)):
            if xs[i] % 2 != 0 or xs[i] == 0:
                return count
            xs[i] /= 2
        else:
            count += 1
    return count


def main():
    _num = input()
    xs = [int(i) for i in input().split()]
    res = half(xs)
    print(res)


if __name__ == "__main__":
    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):
_ = input()
A = list(map(int, input().split()))

cnt = 0
while True:
    if len(list(filter(lambda x: x % 2 != 0, A))) != 0 or A.count(0) == len(A):
        break
    for i in range(len(A)):
        A[i] = A[i] // 2
    cnt += 1
print(cnt)

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

while([i % 2 for i in a].count(0) == N and [i / 2 for i in a].count(0) == 0):
    a = [i / 2 for i in a]
    count += 1

print(count)

Solution (Python):

num = int(input())
list = [int(x) for x in input().split()]

cnt = 0
min = float("inf")

for i in list:
    while i%2 == 0:
        i = i/2
        cnt += 1
    if cnt == 0:
        min = cnt
        break
    elif cnt < min:
        min = cnt
    cnt = 0

print(str(min))

Solution (Python):

num = int(input())
list = [int(x) for x in input().split()]

cnt = 0
min = 100000000000

for i in list:
    while i%2 == 0:
        i = i/2
        cnt += 1
    if cnt == 0:
        min = cnt
        break
    elif cnt < min:
        min = cnt
    cnt = 0

print(str(min))

Solution (Python):



def process(x, judge):
    """Process for given x."""
    for i in range(len(x)):
        if x[i] % 2 == 0:
            x[i] = x[i] / 2
        else:
            judge = 1
    return x, judge


if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))

    counter, judge = -1, 0
    while judge == 0:
        a, judge = process(a, judge)
        counter += 1
    print(counter)

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


def calc(n):
        return n//2
        
        
min=min(l)
cnt=0
flg=True
list2=l

while flg:
    flg=all(elem % 2 == 0 for elem in list2)
    if flg==False:
        break
    list2=list(map(calc,list2))
    min=min//2
    cnt=cnt+1
   
    

print(cnt)

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

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

cnt = 0

while all(i % 2 == 0 for i in a):
    a = [j // 2 for j in a]
    cnt += 1

print(cnt)

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

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

for x in range(30):
  for y in range(N):
    if  A[y]%2==0:
      A[y]=A[y]/2    
    else:
      print(x)
      flag=1
      break
  if flag==1:
    break

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

ans = -1
flg = 1

while(flg):
    ans += 1
    for i in range(N):
        if list(Z)[i] % 2 != 0:
            flg = 0
        else:
            Z[i] /= 2


print(ans)

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

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

ans = -1
flg = 1

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

print(ans)

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

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

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

mini = 1000

for a in A:
    count = 0
    while a % 2 == 0:
        a = a/2
        count = count + 1
    mini = min(mini,count)
print(mini)

Solution (Python):
from fractions import gcd
n=int(input())
l=list(map(int,input().split()))
x=l.pop(0)
for i in l:
  x=gcd(x,i)
c=0
for j in range(int(x*(1/2))+1):
  if x%2==0:
    x=x/2
    c+=1
  else:
    break
print(c)

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

cnts = []
for a_i in a:
    cnt = 0
    while a_i % 2 == 0:
        a_i = a_i / 2
        cnt += 1
    cnts.append(cnt)
        
print(min(cnts))

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
lst = [int(a) for a in stdin.readline().rstrip().split()]

ans = 0
while True:
    count = len([a for a in lst if a % 2 == 1])
    if count > 0:
        break
    else:
        ans += 1

    lst = list(map(lambda x: x // 2, lst))

print(ans)

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

ans = 0
done = False
while not done:
    for i in range(n):
        if a[i]%2 == 0:
            a[i] = a[i]/2
        else:
            done = True
            break
    if not done:
        ans += 1
print(ans)

Solution (Python):



def check_num():
    for i in range(N):
        if A[i] % 2 != 0:
            return False
        else:
            A[i] = A[i] / 2
    return True

if __name__ == '__main__':
    N = int(input())

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

    
    while True:
        if check_num() == False:
            break
        ans += 1

    print(str(ans))