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


a = int(input())


s = input()

a = s.split(" ")
d = []
for b in a:
    d.append(int(b))



ans=0

while(1):
    c=1
    flg=0
    for b in d:
        if b%2==1:
            flg=1
    if flg==0:
        ans=ans+1
    else:
        break
    for i in range(len(d)):
        d[i]=d[i]/2

print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
flag = False
for k in range(5*10**8):
    for i in range(N):
        if A[i]%2==1:
            flag = True
            print(k)
            break
        A[i] = A[i]/2
    if flag:
        break

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
is_even = list(map(lambda x:x%2==0, a))
counter = 0
while is_even.count(False) == 0:
    a = list(map(lambda x:x/2, a))
    counter+=1
    is_even = list(map(lambda x:x%2==0, a))

print(counter)

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

def shiki(x):
    cnt=0
    while x%2==0:
        cnt+=1
        x/=2
    return cnt

for i in range(n):
    ans=min(ans,shiki(a[i]))

print(ans)

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

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

count = 0

while True:
    exist_odd = False

    for i in range(n):
        if a[i] % 2 != 0:
            exist_odd = True
    if exist_odd:
        break

    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 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()))
count = 0
while all(i % 2 == 0 for i in A):
    A = [i/2 for i in A]
    count += 1
print(count)

Solution (Python):
def db2(value):
    result=0
    while value%2==0:
        value/=2
        result+=1
    return result

n,*l=open(0).read().split()
print (min(list(db2(int(x)) for x in l)))

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

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

for A in a:
    cnt=0
    while A % 2==0: 
        A//=2
        cnt+=1
      
    if cnt<ans:
        ans=cnt
print(ans)

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

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())
a = list(map(int, input().split()))
res = 40
for i in range(n):
  tmp = 0
  while a[i] % 2 == 0:
    a[i] = a[i] // 2
    tmp += 1
  res = min(res, tmp)
print(res)

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

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

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

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
ans = 1000000000000

for i in li:
  x = 0
  while i%2 == 0:
    i = i//2
    x += 1
  if x < ans:
    ans = x
    
print(ans)

Solution (Python):
n = int(input())
x = input().split()
count = 0
flg = 0
while flg == 0:
  for i in range(0, n):
    if int(x[i]) % 2 != 0:
      flg = 1
  
  if flg == 0:
    count += 1
    for i in range(0, n):
      x[i] = int(x[i]) / 2
print(count)

Solution (Python):
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):
def resolve():
    N = int(input())
    A = list(map(int, input().split(" ")))
    cnt = 0
    while True:
        for i in range(N):
            if A[i] % 2 != 0:
                print(cnt)
                return
        for i in range(N):
            A[i] = A[i] // 2
        cnt += 1

            

if '__main__' == __name__:
    resolve()

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

Solution (Python):
def is_all_even(li):
    for x in li:
        if x % 2 != 0:
            return False

    return True


def all_div_2(li):
    for i in range(len(li)):
        li[i] /= 2

    return li


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

while is_all_even(a):
    a = all_div_2(a)
    cnt += 1

print(cnt)

Solution (Python):



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

counter = -1
flag = 0
while flag == 0:
    for i in A:
        if (i%2 == 0):
            continue
        else:
            flag = 1
    counter += 1
    A = [i//2 for i in A]

print(counter)

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

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

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

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

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

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

Solution (Python):
icase=0
if icase==0:
    import sys
    n=int(input())
    a=list(map(int,input().split()))
    for i in range(40):
        for ii in range(n):
            aii=a[ii]
            a[ii]=aii//2
            if aii%2==1:
                print(i)
                sys.exit()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
count = 0
    
while "e" not in A:
    A = [x//2 if x%2 == 0 else "e" for x in A]
    count += 1

print(count - 1)

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

print(count - 1)

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

n=0
t=0
while 1:
    
    for i in range(N):
        if A[i]%2 !=0:
            t=1
    
    if t==1:break

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

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

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):
num = int(input())
line = list(map(int,input().split()))
count = True
count_num = 0
while count:
    for i in range(num):
        if line[i] % 2 != 0:
            count = False
    if count:
        for i in range(num):
            line[i] /= 2
    count_num += 1
print(count_num-1)

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

counter=0 


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

print(counter)

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

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

res = 10**9
for a in al:
    c = 0
    while a%2==0:
        a //= 2
        c += 1
    res = min(res, c)
print(res)

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

cntDiv = 0
for i in range(10**10):
  cnt =0
  for j in range(n):
    if a[j]%2==0:
      a[j] = a[j]/2
      cnt += 1
  if cnt != n:
    break
  else:
    cntDiv +=1
    continue
print(cntDiv)

Solution (Python):

import io

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

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

ans = float("inf")

for i in range(N):
    cnt = 0
    while a[i] % 2 == 0:
        a[i] /= 2
        cnt += 1
    ans = min(cnt, ans)

print(ans)

Solution (Python):
import sys
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(1000):
    for i in range(len(A)):
        if A[i]%2 == 1:
            print(ans)
            sys.exit()
        A[i] = A[i]/2
    ans += 1

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
 
count = 0
while True:
  A, mod = zip(*[divmod(a, 2) for a in A])
  if sum(mod) > 0:
    break
  count += 1
print(count)

Solution (Python):

n = int(input())
l = list(map(int,input().split()))
err = 0
total = 0

while err == 0:
    count = 0
    for nom in l:
        if nom % 2 == 1:
            err = 1
            count += 1
        else:
            l[count] = nom / 2
            count += 1
    if err == 0:
        total += 1
print(total)

Solution (Python):

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

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

Solution (Python):
s = int,input()
i = list(map(int,input().split()))
err = 0
total = 0

while err == 0:
    count = 0
    for nom in i:
        if nom % 2 == 1:
            err = 1
            count += 1
        else:
            i[count] = nom / 2
            count += 1
    if err == 0:
        total += 1

print(total)

Solution (Python):
s = int,input()
i = list(map(int,input().split()))
err = 0
total = 0
while err == 0:
    count = 0
    for nom in i:
        if nom % 2 == 1:
            err = 1
            count += 1
        else:
            i[count] = nom / 2
            count += 1
    if err == 0:
        total += 1
print(total)

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

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

print(ans)

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

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

print(ans)

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







import numpy as np




N = int(input())
arrA = np.array(input().split(),dtype=np.int64)

def check():
    temp = arrA % 2
    if 1 in temp:
        return False
    return True

ans = 0
while check():
    arrA = arrA // 2
    ans += 1

print(ans)

Solution (Python):
N = int(input())
Alist = list(map(int, input().split()))
counter = 0

while True:
    Ajudge = []
    for i in range(N):
        Alista = Alist[i]
        Ajudge.append(Alista % 2)
    if Ajudge.count(0) != N:
        break
    else:
        Alist = list(map(lambda x:x / 2, Alist))
        counter += 1

print(counter)

Solution (Python):
import math
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    M = math.floor(math.log2(max(A)))
    count = 0
    for _ in range(M):
        success = True
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] /= 2
            else:
                success = False
                break
        if success == False:
            break
        count += 1
    print(count)
main()

Solution (Python):
import numpy as np
n = input()
l = np.array(list(map(int,input().split())))
counter = 0
while True:
    if not (l%2==0).all():
        break
    l = l/2
    counter+=1
print(counter)

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

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

print(cnt)

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

Solution (Python):
n=int(input())
a=[0]*n
a=list(map(int,input().split()))
flag=0
num=0
for i in range(100):
  for j in range(n):
    if (a[j]%2==0):
      a[j]=a[j]//2
    else:
      flag=1
      break
  if (flag==1):
    break
  num+=1
print(num)

Solution (Python):
N = int(input())
A = input()
Aa = A.split()
base = int(Aa[0])
times = N+1
y = 0
while base%2 == 0:
  y += 1
  base /= 2

if y != 0:
  for i in Aa[1:times]:
    i = int(i)
    x = 0
    while i%2 == 0:
      x += 1
      i /= 2
    if y >= x:
      y = x
        
print(y)

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

def devide2(n):
    return n / 2

ans = 0
while True:
    a = list(map(devide2, a))
    if all([n.is_integer() for n in a]):
        ans += 1
    else:
        break

print(ans)

Solution (Python):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    ret = 0
    while all([n % 2 == 0 for n in A]):
        ret += 1
        A = [a // 2 for a in A]
    print(ret)


if __name__ == '__main__':
    main()

Solution (Python):
def sunukee(a):
    num = 0
    for i in range(len(a)):
        if (a[i] % 2) == 0:
            num += 1
        
    if num == len(a):
        return True
    else:
        return False
def sunuke(a):
    for i in range(len(a)):
        a[i] = a[i]/2
    return a
n = int(input())
a = list(map(int, input().split()))
s = 0
while sunukee(a):
    a = sunuke(a)
    s += 1
print(s)

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

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

def func(N, A):
    ans = 0
    while True:
        for i in range(N):
            if A[i]%2 == 0:
                A[i] /= 2
            else:
                return ans
        ans += 1
    return ans

print(func(N,A))

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

def count_howmany_divide(val):
  result = 0

  while(True):
    if val % 2 != 0:
      break
    else:
      val /= 2
      result += 1

  return result
    

a_i_divided = list(map(count_howmany_divide, a_i))

print(min(a_i_divided))

Solution (Python):
def are_even(data):
    return all([i % 2 == 0 for i in data])

N = input()
data = list(map(int, input().split()))
count = 0
while are_even(data):
    data = [i/2 for i in data]
    count += 1
print(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 == 1:
            print(ans)
            exit()
        
        a[i] /= 2
    ans += 1

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

for a in A:
    i = 0
    while True:
        if a % 2 == 0:
            i += 1
            a = a // 2
        else:
            break
    count.append(i)

print(min(count))

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

j = 0
l = len(A)

while 1:
    count = 0
    for i in A:
        if i % 2 == 0:
            count += 1

    if count == l:
        j += 1
        for i in range(l):
            A[i] = A[i] // 2
    else:
        break

print(j)

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

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

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

M = 10 ** 7
for num in A:
    cnt = 0
    while num % 2 == 0:
        num //= 2
        cnt += 1
    M = min(cnt, M)
print(M)

Solution (Python):

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

m = 0
canDivided = True

while canDivided:
    for i in range(len(a)):
        if a[i] % 2 == 0:
            a[i] //= 2
        else:
            canDivided = False
            break
    else:
        m += 1

print(m)

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

count = 0

divide_two_num = []
for i in A:
    n = 0
    while i > 1:
        if i % 2 == 0:
            i //= 2
            n += 1
        else:
            break
    divide_two_num += [n]

print(min(divide_two_num))

Solution (Python):
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())
data = list(map(int,input().split())) 
flg = 0 
ct = 0
while flg ==0:
    ct += 1
   
    for i in range(n):
        if data[0]%2 == 0:
           
            data.append(data[0]//2)
            del data[0]
        else:
            flg = 1
            break
print(ct-1)

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=int(input())
A=list(map(int,input().split()))
mini=100100100100
for i in range(N):
  a=A[i]
  c=0
  while a%2==0:
    a//=2
    c+=1
  if mini>c:
    mini=c
print(mini)

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

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

Solution (Python):
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):
a = int(input()) 
b=0
flag=0
i = list(map(int, input().split()))

while flag == 0:
    for n in range(a):
        if i[n]%2 == 1:
            flag = 1
        i[n] = i[n]/2
    b=b+1
print(b-1)

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

sub = (10 ** 9) + 1
for i in range(n):
    ans = 0
    while a[i] % 2 == 0 and a[i] != 0:
        a[i] = a[i] // 2
        ans += 1
    sub = min(ans, sub)
    
print(sub)

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

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

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
A=[]
for i in range(n):
    x=0
    for j in range(10**5):
        if a[i]%2==0:
            a[i]//=2
            x+=1
        if a[i]%2!=0:
            A.append(x)
            break
print(min(A))

Solution (Python):
def f(a):
    a = int(a)
    ans = 0
    while a%2==0:
        a //= 2
        ans += 1
    return ans

_ = input()
A = map(f, input().split())
print(min(A))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
def factorize2(n): 
    i = 2
    m = 1
    table = []
    sign = -1
    while i * i <= n:
        j = 0
        while n % i == 0:
            n //= i
            j += 1
        if j != 0:
            table.append([i,j])
        if i >= 5:
            if sign < 0:
                sign = 1
                i = 6*m + sign
            else:
                m += 1
                sign = -1
                i = 6*m + sign
        elif i == 2:
            i += 1
        elif i == 3:
            i = 5
    if n > 1:
        table.append([n,1])
    return table 
ans = 10**9
for i in range(N):
    d = factorize2(A[i])
    if d[0][0]==2:
        ans = min(ans,d[0][1])
    else:
        ans = 0
        break
print(ans)

Solution (Python):
import numpy as np

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

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

print(cnt)

Solution (Python):
def div(n):
   return n//2
def myAnswer(N:int,A:list) -> int:
   counter = 0
   while all([i%2==0 for i in A]):
      counter+=1
      A = list(map(div,A))

   return counter

def modelAnswer():
   tmp=1
def main():
   N = int(input())
   A = list(map(int,input().split()))
   print(myAnswer(N,A))

if __name__ == '__main__':
   main()

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


def count(x):
    ans = 0
    while True:
        if x % 2 == 0:
            ans += 1
            x //= 2
        else:
            break
    return ans


A = list(map(count, A))
print(min(A))

Solution (Python):

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

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

Solution (Python):
n = input()
number = []
count = 0
flag = False

number = list(map(int, input().split()))
while flag != True:
    tmp = []
    for n in number:
        if n % 2 == 0:
            tmp.append(n / 2)

        else:
            flag = True
            break

    if flag:
        print(count)
        break

    number = tmp
    count += 1

Solution (Python):
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Solution (Python):
cnt = int(input())
arr = input().split()

counter = 0
shouldBreak = False
while True:
    for i in range(len(arr)):
        if int(arr[i]) % 2 == 1:
            shouldBreak = True
            break;
        arr[i] = int(arr[i])/2
    if shouldBreak:
        break
    counter += 1

print(counter)

Solution (Python):
cnt = int(input())
arr = input().split()

def is_all_even(arr):
    for val in arr:
        if int(val) % 2 == 1:
            return False
    return True

counter = 0

while is_all_even(arr):
    for i in range(len(arr)):
        arr[i] = int(arr[i])/2
    counter += 1

print(counter)

Solution (Python):
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
flag = True
while flag:
    for a in A:
        if a % 2 != 0:
            flag = False
    if flag:
        A = [a // 2 for a in A]
        ans += 1
print(ans)

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

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

Solution (Python):


N = 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):
import numpy as np
N,*A=map(int,open(0).read().split())
A = np.array(A)
for i in range(100000):
  if (A%2<1).all():
    A=A//2
  else:
    print(i)
    exit()

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

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

print(ans)

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 = int(input())
A = input().split()

b = 0

flag = True

while flag:
    for i in range(N):
        if i != N-1:
            if int(float(A[i])) % 2 == 0:
                A[i] = str(int(float(A[i]))/2)
            else:
                flag = False
                break
        else:
            if int(float(A[i])) % 2 == 0:
                A[i] = str(int(float(A[i]))/2)
                b += 1
            else:
                flag = False
                break
print(b)

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


print(count)

Solution (Python):
num = int(input())
l = list(map(int, input().split()))
count=0
index = 0
flag = True

while flag:
    for elmnt in l:
        
        if elmnt%2 != 0:
            flag = False
            break
        l[index] = int(l[index]/2)
        index+=1
        count+=1
        
    
    index = 0

print(int(count/num))

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

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

def f(x):
    count=0
    while x%2==0:
        x/=2
        count+=1
    return count
count=min(map(f,a))
print(count)

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

i = 0
while 1:
    A = A / 2
    if np.all(A.astype(np.int) == A):
        i += 1
    else:
        break
    
print(i)

Solution (Python):

"""
import sys
import clipboard



if sys.platform == 'ios':
	sample = clipboard.get()
	file = open('input_file.txt', 'w')
	file.write(sample)
	file.close()
	sys.stdin = open('input_file.txt')
"""		
						
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):
a = int(input())
b = list(input().split())
count = 0
next = []
e = 0
while e == 0:
  i = 0
  e = 0
  next.clear()
  for i in b:
    e = int(i) % 2
    if e == 1:
      break
    else:
      add = int(i) / 2
      next.append(str(int(add)))
  if e == 0:
    b.clear()
    b.extend(next)
    count += 1
print(count)

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

Solution (Python):

N = int(input())

in_list = list(map(int,input().split()))
odd_flg = False
cnt = 0

while(not(odd_flg)):
  for n in range(N):
    if (in_list[n]%2) != 0:
      odd_flg = True
      break
    else:
      in_list[n] = int(in_list[n]/2)
  cnt += 1

print(cnt-1)

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

ans = 0
flag = True

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

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

times = 0
while True:
    if list(filter(lambda x:x%2==0, a)) == a:
        a = list(map(lambda x: x//2, a))
        times += 1
    else:
        print(times)
        break

Solution (Python):
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):
n = input()
nums = list(map(int, input().split()))

count = 0

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

print(count)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    inf = float('inf')
    N = int(readline())
    A = list(map(lambda x: format(int(x), 'b')[::-1], readline().split()))
    cnt = inf
    for a in A:
        cnt = min(a.index('1'), cnt)
    print(cnt)

    return

if __name__ == '__main__':
    main()