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())
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:
            break
            
    else:
        count += 1
        continue
        
    break
    
print(count)

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

Solution (Python):
A=input()
B=list(map(int,input().split()))
le = len(B)
for j in range(30):
    B=[i // 2 for i in B if i % 2 == 0]
    if len(B) == le:
        continue
    else:
        print(j)
        exit()

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

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

print(ans)

Solution (Python):
import sys

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

loop = 0

while (1):
  for i in l:
    if i % (2 ** (loop + 1)) != 0:
      print(loop)
      sys.exit(0)
  loop = loop + 1

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
 
def hoge(x):
    for i in range(50):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i

print(min([hoge(x) for x in l]))

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

def hoge(x):
    for i in range(100):
        if x % 2 == 0:
            x = x//2
        else:
            break
    return i

print(min([hoge(x) for x in l]))

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

aa = [int (i) for i in a]
check = 0
count = -1

while check == 0:
    for i in range(n):
        if aa[i] % 2 == 0:
            aa[i] = aa[i] / 2
        else:
            check = 1
    count += 1
    if count > 100:
        break

print(count)

Solution (Python):
import sys
N=int(sys.stdin.readline().strip())
A=map(int, sys.stdin.readline().split())

def func(n):
    cnt=0
    while n%2==0:
        cnt+=1
        n/=2
    return cnt

ans=float("inf")
for x in A:
    ans=min(ans,func(x))
if ans==float("inf"):
    print 0
else:
    print ans

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

cnt = 0
while True:
    flag = False
    for i in range(N):
      if A[i]%2 != 0:
          flag = True
    if flag:
      break
    else:
      A = list(map(lambda x: x/2, A))
      cnt+=1
print(cnt)

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

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

ans = 0

def calc_double(n):
    return n * 0.5

for i in range(10**9):
    for i in range(n):
        if a[i] <= 0 or a[i] % 2 == 1:
            print(ans)
            exit()
        else:
            pass
    a = list(map(calc_double, a))
    ans = ans + 1

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans=0
isLoop=True
while(isLoop):
    c=0
    for i in range(0, N):
        if A[i]%2==0:
            c+=1
        else:
            isLoop=False

    if c==N:
        for i in range(0, N):
            A[i] = A[i]/2

        ans+=1

print(ans)

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

cnt=0
okFlg = True

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

Solution (Python):
import sys
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)
            sys.exit()
    count += 1

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

Solution (Python):
N = int(input())
ans = int(1e9)
for a in map(int, input().split()):
    res = 0
    while True:
        if a % 2 == 0:
            res += 1
            a //= 2
        else:
            break
    ans = min(ans, res)
print(ans)

Solution (Python):
c = input()
a = set(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=int(input())
a=list(map(int, input().split()))
ans=10**9

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

print(ans)

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

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

count = 0
ans = 0

while 1:
    for x in range(0, n):
        if A[x] % 2 == 0:
            count += 1
    if count == n:
        count = 0
        ans += 1
        for y in range(0, n):
            A[y] /= 2
    else:
        break

print(ans)

Solution (Python):
def isValid(List):
    for num in List:
        if num % 2 != 0:
            return False
    return True

n = int(input())
list_x = list(map(int, input().split(' ')))
count = 0
while  (isValid(list_x)):
    count += 1
    for i in range(n):
        list_x[i] /= 2

print(count)

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

print(count-1)

Solution (Python):
n = int(input())
a_list = list(map(int,input().split()))
ans_list = []
for num in a_list:
  a = format(num,'b')[::-1].find('1')
  ans_list.append(a)
print(min(ans_list))

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

Solution (Python):
from fractions import gcd
from functools import reduce

n = int(input())

a = tuple(map(int,input().split()))
t = reduce(gcd,a)

for i in range(t):
  if t%2**i!=0:
    print(i-1)
    break
    
if t==1:
  print(0)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
flg=0
while flg==0:
    for i in a:
        if i%2 != 0:
            flg=1
    a=list(map(lambda x: x/2,a))
    ans+=1
print(ans-1)

Solution (Python):
n = int(input())
*a, = map(int, input().split())
cnt = 0
f = True

while f:
    for j, k in enumerate(a):
        if k%2 != 0:
            f = False
        a[j] = a[j]/2
    cnt += 1 if f else 0

print(cnt)

Solution (Python):
import numpy as np
input()
print(list(reversed(np.binary_repr(np.bitwise_or.reduce(np.array(input().split(), dtype=np.int32))))).index("1"))

Solution (Python):
n = int(input())
a = map(int, input().split())
cnt = -1
flg = False
while True:
    cnt += 1
    tmp_a = []
    for ai in a:
        if ai%2 == 0:
            tmp_a.append(ai//2)
        else:
            flg = True
            break
    if flg:
        break
    a = tmp_a
print(cnt)

Solution (Python):
v1 = int(input())
v2 = list(map(int, input().split()))

count = -1
stop = True
while stop:
    count = count + 1
    for i in range(v1):
        if v2[i] % 2 != 0:
            stop = False
            break
        v2[i] = v2[i] / 2
print(count)

Solution (Python):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = 0
    odd_num = 0
    
    while odd_num == 0:
        for Ai in A:
            if Ai%2 != 0:
                odd_num+=1
        if odd_num == 0:
            cnt +=1
            
            A = list(map(lambda x: x/2,A))
    print(cnt)
if __name__ == '__main__':
    main()

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 = count + 1


print(count)

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

N = ri()
A = ri_()
ans = INF
for a in A:
    tmp = 0
    while a % 2 == 0:
        tmp += 1
        a = a // 2
    ans = min(tmp, ans)
print(ans)

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

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

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

for a in A:
    ans.append(format(a, 'b')[::-1].find('1'))
print(min(ans))

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

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

print(count - 1)

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

EvenCount = int(N)
OperationCount = 0

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

print(OperationCount)

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

a = []
i = 0
for i in range(N):
    a.append(int(0))
    while list[i] % 2 == 0:
        a[i] = a[i] + 1
        list[i] = int(list[i]/2)
print(min(a))

Solution (Python):

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

    countor = 0
    while True:
        if (1 in list(map(lambda x: x%2, A))) == True: break
        A = list(map(lambda x: x/2, A))
        countor += 1
    print(countor)

if __name__ == "__main__":
    main()

Solution (Python):

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

    
    
    
    
    
    
    
    

    countor = 0
    while True:
        
        if (1 in list(map(lambda x: x%2, A))) == True: break
        A = list(map(lambda x: x/2, A))
        countor += 1
        
    print(countor)

if __name__ == "__main__":
    main()

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

can_devide = sum([a%2 for a in a_list])==0
count = 0
while can_devide:
    count += 1
    for i, a in enumerate(a_list):
        a_list[i] = a//2
        
    can_devide = sum([a%2 for a in a_list])==0

print(count)

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

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

print(c)

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

t = 0
f = False

while True :
    for i in range(n):
        if a[i] % 2 == 0 :
            a[i] //= 2
        else :
            f = True
            break

    if f == True :
        print(t)
        break
    else :
        t += 1

Solution (Python):
a = int(input())
list = list(map(int, input().split()))
cnt=0
ok = True
while ok:
    for i in list:
        if not i%2==0:
            ok = False
            break

    if ok : cnt += 1
    list = [int(i / 2) for i in list]
print(cnt)

Solution (Python):
def calc_shift_count(num):
    shift_count = 0
    while True:
        if num % 2 == 0:
            num >>= 1
            shift_count += 1
        else:
            return shift_count


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

shift_count = -1
for num in num_list:
    if shift_count == -1:
        shift_count = calc_shift_count(num)
    else:
        if num % (2 << shift_count) == 0:
            continue
        else:
            shift_count = min(shift_count, calc_shift_count(num))
    if shift_count == 0:
        break

print(shift_count)

Solution (Python):
N = int(input())
*A, = map(int, input().split())
ans = float('inf')
for a in A:
    cnt = 0
    while a % 2 == 0:
        a /= 2
        cnt += 1
    ans = min(ans, cnt)
print(ans)

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

Solution (Python):
import numpy as np

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

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

Solution (Python):

import numpy as np

count=0
num_of_nums=input()
nums=np.array(input().split())
nums=nums.astype(int)

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

print(count)

Solution (Python):
def get(x):
  count=0
  while x%2==0:
    count+=1
    x=x/2
  return count
N=int(input())
A=input().split()
a=100000000000
for i in range(N):
  a=min(a,get(int(A[i])))
  
print(a)

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

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

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

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

print(result)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
c = 0
bool = True

while (bool):
    for i in range(N):
        if a[i] % 2 == 0:
            a[i] = a[i] // 2
        else:
            bool = False
            print(c)
            break    
    else:
        c += 1

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

Solution (Python):
import sys

def main():
    N = int(input())
    A = list(map(int,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):
import sys

def main():
    N = int(input())
    A = list(map(int,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):
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):
n = int(input())
a = list(map(int,input().split()))
maxop = 10**9
for i in range(n):
  ops = 0
  while (a[i]%2==0):
    a[i] = a[i]//2
    ops += 1
  maxop = min(maxop,ops)
print(maxop)

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

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

Solution (Python):
n = input()
n = int(n)
list = [0] * n

list = input().split()

for i in range(n):
    list[i] = int(list[i])
bool = True
count = 0
while(bool):
    for i in range(len(list)):
        if(list[i]%2 == 0):
            list[i] /= 2
        else:
            bool = False
    count += 1

print(count-1)

Solution (Python):
def main():
    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] /= 2
            else:
                flag = False
                break
        else:
            count += 1
    print(count)

if __name__ == '__main__':
    main()

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

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

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

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

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

print(ans)

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


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

print(ans)

Solution (Python):
import numpy as np

def main():
    N = int(input())
    lst = np.array(list(map(int, input().split())))
    cnt = 0
    while (lst%2==0).all():
        cnt += 1
        lst = lst/2
    print(cnt)

main()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


n=I()
A=LI()
for i in range(40):
    
    
    for j in range(n):
        if A[j]%2==0:
            A[j]//=2
            continue
        else:
            print(i)
            sys.exit()

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):
input()
num_list = list(map(int, input().split()))
cnt = 1
while all(x % 2**cnt == 0 for x in num_list):
    cnt += 1
print(cnt - 1)

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

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

ans = 1000000
for i in range(n):
  c = 0
  while a[i]%2==0:
    a[i] = a[i]/2
    c += 1
  if (c<ans):
    ans = c

print(ans)

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


def all_even(A):
    for a in A:
        if a % 2 != 0:
            return False
    return True


count = 0
while all_even(A):
    A = [i // 2 for i 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):
n = int(input())
b = list(map(int, input().strip().split()))


num = 0
for j in range(100):
    count = 0
    for i in range(n):
        if b[i] % 2 == 0:
            count = 1 + count


    if count == n:
        b = [c/2 for c in b]
        num = 1 + num

print(num)

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

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

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

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

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

while True:
  K = 0
  for i in range(N):
    if D[i] % 2 == 0:
      K += 1
  if K == N:
    for j in range(N):
      D[j] = D[j] / 2
    A += 1
  else:
    break

print(A)

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

min = 100000000000000000
for i in range(n):
  tmp = kokuban[i]
  atta = 0
  while tmp%2==0:
    atta += 1
    tmp //= 2
  if min > atta:
    min = atta
print(min)

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 main():
    n = int(input())
    a = list(map(int, input().split()))
    div = [0]*n
    ans = format(a[0], 'b')[::-1].find('1')
    for i, aa in enumerate(a):
        tmp = format(aa, 'b')[::-1].find('1')
        if tmp < ans:
            ans = tmp
    print(ans)


if __name__ == "__main__":
    main()

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

def check(la):
    c = 0
    for i in range(len(la)):
        if la[i] % 2 == 0:
            c += 1
    if c == len(la):
        return True
    else:
        return False
        
ans = 0
while check(l):
    for i in range(N):
        l[i] = l[i]/2
    ans += 1

print(ans)

Solution (Python):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    A_arr = list(map(int,_in[1].split(' ')))  
    
    A_arr_bin = list(map(bin,A_arr))
    cnt = -1
    for A_bin in A_arr_bin:
        _ = len(A_bin.rsplit('1',1)[-1])
        if cnt > _ or cnt==-1:
            cnt = _
    
    print(cnt)

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):
num = int(input())

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

ans = 0

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


print(ans)

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

count=0
for i in range(0,10*7):
  keep=0
  for j in range(0,n):
    if a[j]%2==0:
      a[j]=a[j]//2
    else:
      keep=1
  if keep==0:
    count+=1
  else:
    break
print(count)

Solution (Python):
n = int(input())
l = [int(x) for x in input().split()]
cnt = 0
f = False
while True:
    if f:
        break
    for i in range(len(l)):
        if l[i] % 2 == 0:
            l[i] = l[i] // 2
        else:
            f = True
            break
    else:
        cnt += 1

print(cnt)

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

counter = 0
while (len(listName) == num):
    listName = [i /  2 for i in listName if i%2 == 0]

    counter += 1
print(counter - 1)

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

cnt = []
for i in range(N):
    tmp = 0
    while A[i]%2 == 0:
        tmp += 1
        A[i] //= 2
    cnt.append(tmp)

print(min(cnt))

Solution (Python):
num = int(input())
a = input().split(" ")

count = 0
ans = -1

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

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

while True:
    if any((x % (2 ** n) != 0 for x in num)):
        break
    else:
        n += 1

print(n-1)

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

Solution (Python):
cnt = input()
numlist = list(map(int, input().split())) 
flg = True
num = 0

while True:

    for x in range(len(numlist)):
    
        if numlist[x] % 2 != 0:
            flg = False
            break

        numlist[x] = (numlist[x] / 2)
    
    if flg == False:
        break

    num  += 1

print(num)

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

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

ans = 10**9
for i in a:
    ans = min(ans, count(i))
print(ans)

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):
s=map(int,input().split())
s=map(int,input().split())
ans = []
for i in s:
    tmp=i
    count=0
    while(1):
        if tmp%2==0:
            tmp=tmp/2
            count=count+1
        else:
            break
    ans.append(count)
print(min(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):
n = int(input())
al = list(map(int, input().split()))

def dev_by_2(x, cnt=0):
    if x % 2 == 0:
        x /= 2
        cnt += 1
        return(dev_by_2(x, cnt))
    else:
        return cnt

ans = 1001001001
for a in al:
    ans = min(ans, dev_by_2(a))

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
else: print(count)

Solution (Python):
n= int(input())
nyuuryok = input().split()
nyuuryoku = [0]*n
for i in range(n):
    nyuuryoku[i] = int(nyuuryok[i])
count = 0
count2 = 0
while count2 == 0:
    if(all([x % 2 == 0 for x in nyuuryoku])):
        for i in range(n):
            nyuuryoku[i] = nyuuryoku[i]/2
        count += 1
        
    else:
        count2 += 1
print(count)

Solution (Python):
N = int(input().rstrip())
INPUT = list(map(int, input().rstrip().split(' ')))

for count in range(1000000000):
    for i in range(N):
        p, mod = divmod(INPUT[i], 2)
        if mod == 0:
            INPUT[i] = p
        else:
            break
    else:
        continue
    print(count)
    break

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()))
t=0
g=0
while g==0:
    for i in range(n):
        if a[i]%2==0:
            a[i]=a[i]//2
            t+=1
        else:
            g=1
print(t//n)

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

while a==True:
    for i in range(N):
        if A[i]%2==0:
            A[i]=A[i]//2
        else:
            a=False
    ans+=1
    
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):
n = int(input())
numList = list(map(int, input().split()))

flag = True
cnt = 0

while flag:
    for i in range(len(numList)):
        if numList[i] % 2 == 1:
            flag = False
            cnt -= 1
            break
        numList[i] /= 2

    cnt += 1
print(cnt)

Solution (Python):
N = int(input())
A = input().split()
X = 1000000000
count = 0
for i in range(N):
  while int(A[i]) % 2 == 0:
    A[i] = int(A[i])//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)

Solution (Python):
N = int(input())
A = input().split()
X = 1000000000
count = 0
for i in range(N):
  t = int(A[i])
  while t % 2 == 0:
    t = t//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)

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

N=int(input())
A_list = [int(A_i) for A_i in input().split()]
B_list = min(map(function,A_list))
print(B_list)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
k=10**9
for i in range(n):
    t=0
    while True:
        if a[i]%2==0:
            a[i]=a[i]//2
            t=t+1
        else:
            if t<k:
                k=t
                break
            else:
                break
print(k)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
key = 10**9

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

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

Solution (Python):
n = int(input())
lst = list(map(int,input().split()))
cnt = 10000000000000000000
for i in range(n):
  temp = 0
  while (lst[i]%2==0):
    lst[i] = lst[i]//2
    temp += 1
  if temp < cnt:
    cnt = temp
print(cnt)