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):
def main():
    from builtins import int, map, list, print, len
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

print(count)

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

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

r = 0

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

Solution (Python):
import numpy as np
input()
x = np.array(input().split(),dtype=np.int32)

ans = 0
while (x%2==0).all():
  x //= 2
  ans += 1
print(ans)

Solution (Python):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    count = 0
    j = 2
    while True:
        for i in range(N):
            if A[i]%j != 0:
                print(count)
                exit()
        count += 1
        j *= 2
resolve()

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

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

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

cnt = 0
while True:
    if len([n for n in s if n % 2 != 0]) != 0:
        print (cnt)
        break
    else:
        s = list(map(lambda n: n / 2, s))
        cnt = cnt + 1

Solution (Python):
import sys
from itertools import combinations
import math


def I(): return int(sys.stdin.readline().rstrip())


def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))


def S(): return sys.stdin.readline().rstrip()


def LS(): return list(sys.stdin.readline().rstrip().split())


n = I()
A = LI()
ans = 0
isEven = True
while 1:
    for a in A:
        if a % 2 == 1:
            isEven = False
    if isEven == False:
        break
    for a in range(len(A)):
        A[a] = A[a] // 2
    ans += 1
print(ans)

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

Solution (Python):


import sys
input=sys.stdin.readline

def main():
    N=int(input())
    A=list(map(int,input().split()))
    cnt=0
    for i in range(1,36):
        d=2**i
        for Ai in A:
            if Ai%d!=0:
                print(cnt)
                exit()
        cnt+=1
    print(cnt)
    
    
    
if __name__=="__main__":
    main()

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

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

counter = 0
while (A%2 == 0).all():
    A //= 2
    counter += 1
print(counter)

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

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

print(ans)

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

Solution (Python):
N=int(input())
a=list(map(int,input().split()))
odd = False
cnt=0
while True:
    for i in range(0,N):
        if a[i] % 2 != 0:
            odd=True
    if odd :
        break

    for i in range(0,N):
        a[i]/=2
    cnt+=1
print(cnt)

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

print(count)

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

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

print(res)

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

num = 0
flag = 0

while True:
  for k in range(n):
    if not r[k] % 2:
      r[k] /= 2
    else:
      flag = 1
  if flag:
    break
  num += 1

print(num)

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

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

print(res)

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):
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    ans = 0
    while True:
        for i in range(n):
            if a[i] % 2 == 0:
                a[i] //= 2
            else:
                print(ans)
                return
        ans += 1 

if __name__ == '__main__':
    main()

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

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

Solution (Python):



import os
import sys







def main():
    n = int(input())
    a = list(map(int, input().split()))
    result = 0
    loop = True

    while True:
        for i, v in enumerate(a):
            if v % 2 == 1:
                loop = False
                break
            else:
                a[i] = v / 2
        if not loop: break
        result += 1

    print(result)
    return


if __name__ == '__main__':
    main()

Solution (Python):



import os
import sys







def main():
    n = int(input())
    a = list(map(int, input().split()))
    result = 0
    loop = True

    while True:
        for i, v in enumerate(a):
            if v % 2 == 1:
                loop = False
                break
            else:
                a[i] = v / 2
        if not loop: break
        result += 1

    print(result)
    return


if __name__ == '__main__':
    main()

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

endflag=False
for i in range(10**9):
    for j in range(n):
        if A[j]%2==1:
            print(i)
            endflag=True
            break
        else:
            A[j]//=2
    if endflag:
        break

Solution (Python):
def waru(n):
  return int(n/2)

number = int(input())
line2 = input().split()
cnt = 0
cnt2 = 0
cnt3  =0
while cnt2 ==0:
  cnt = 0
  for i in range(len(line2)):
    line2[i] = int(line2[i])
    if int(line2[i])%2 ==0:
      cnt +=1
  if cnt == len(line2):
    line2 = list(map(waru,line2))
    
    cnt3 +=1
  else:
    cnt2 +=1
print(cnt3)

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

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

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

j = 0
while True:
  for i in range(len(A)):
    if A[i] %2 != 0:
      print(j)
      exit()
    else:
      A[i] = A[i]//2
  j += 1
  
print(i)

Solution (Python):


def is_odd(num):
    return num % 2 != 0

def odd_in_list(num_list):
    for num in num_list:
        if is_odd(num):
            return True
    
    return False

def half(num):
    return num / 2

def shift_only(num_list, counter):
    if odd_in_list(num_list):
        print('its over')
        return counter
    else:
        new_list = list(map(half, num_list))
        counter += 1
        print('continue', num_list, counter)
        return shift_only(new_list, counter)


n = int(input())

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


counter = 0
flag = True

while flag:
    for i in range(n):
        
        if a_list[i] % 2 != 0:
            
            flag = False
            break
        else:
            continue
    
    if not flag:
        break
    
    for i in range(n):
        a_list[i] /= 2
    counter += 1

    
    

print(counter)

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

main()

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

Solution (Python):
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 10**5
    for a in A:
        a = prime_factorize(a)
        ans = min(ans, a.count(2))
    if (ans == 10 ** 5):
        ans = 0
    print(ans)
    return


resolve()

Solution (Python):

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

count = 0
while(all([x % 2 == 0 for x in A])):
    A = [ int(x / 2) for x in A]
    count += 1
print(count)

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

N = input()
B = map(int, input().split())

answer = float("inf")
for i in B:
    answer = min(answer, len(bin(i)) - bin(i).rfind("1") - 1)
print(answer)

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

def calc(n):
  return n / 2
  
  
while not B:
  for i in array:
    if i % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    count += 1
  else:
    break
        
print(count)

Solution (Python):
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in array:
    if i % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Solution (Python):
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

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

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

print (C-1)

Solution (Python):
import numpy as np
N = int(input())
arr1 = np.array(list(map(int,input().split())))
arr2 = arr1 % 2
s = 0
while 1 not in arr2:
  arr1 = arr1 // 2
  arr2 = arr1 % 2  
  s += 1

print(s)

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

Solution (Python):
def main():
    N = int(input())
    As = [int(v) for v in input().split()]
    count = 0
    while all(x % 2 == 0 for x in As):
        count += 1
        As = [x // 2 for x in As]

    print(count)


if __name__ == "__main__":
    main()

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

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

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

print(res)

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


count = 0

while True:
  even_count = 0
  for i in range(n):
    if a[i] % 2 == 0:
      even_count += 1

  if even_count == len(a):
    a = list(map(lambda x : x // 2, a))
    count += 1

  else:
    break

print(count)

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

Solution (Python):

n=int(input())

list_1=input().split()
list_2=list(range(len(list_1)))
for i in range(len(list_1)):
  list_1[i]=int(list_1[i])

ctr = 0

while True:
  for j in range(len(list_1)):
    list_2[j]=list_1[j]%2
    list_1[j]/=2
  s=sum(list_2)
  if(s!=0):
    break
  else:
    ctr+=1
print(ctr)

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

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

c = 0

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

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

c = 0

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

Solution (Python):
import sys
n = int(input())
lst = list(map(int, input().split()))
res = 0
for p in range(200):
  for i in range(n):
    if lst[i] % 2 == 1:
      print(res)
      sys.exit()
  lst = [int(j / 2) for j in lst]
  res += 1

Solution (Python):


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

ans = 1e10
for i in range(n):
    
    j = 0
    while N_list[i] % 2 == 0:
        N_list[i] = N_list[i] / 2
        j += 1
    if ( j < ans):
        ans = j

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

Solution (Python):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    c = 0
    ans = 0
    while c < 1:
        for i in range(len(A)):
            if A[i] % 2 != 0:
                print(ans)
                return
            A[i] = A[i] // 2
        ans += 1
main()

Solution (Python):
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):
import math
n=int(input())
a=list(map(int,input().split()))
ans=32

for i in a:
  x=i
  two=0
  while not x%2:
    x/=2
    two+=1
  if ans>two:
    ans=two

print(ans)

Solution (Python):
N=int(input())
A_list=list(map(int,input().split()))
count=0
judge=0
while judge==0:
    judge+=sum([i%2 for i in A_list])
    for i in range(N):
            A_list[i]/=2
    count+=1
print(count-1)

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

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

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

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

print(count)

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

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

flag = 1
count = 0

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

Solution (Python):
n = int(input())
arr = list(map(int, input().split()))
k = 0
f = 0
while f == 0:
  for i in range(n):
    if arr[i] % 2 != 0:
      f = 1
    else:
      arr[i] //= 2
  k += 1
print(k - 1)

Solution (Python):
import numpy as np
def solve():
    N = int(input())
    A = np.array(list(map(int, input().split())),dtype=np.int64)
    count = 0
    while True:
        if np.sum(A%2) ==0:
            A = A//2
            count += 1
        else:
            return print(count)

if __name__ == '__main__':
    solve()

Solution (Python):






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





ans = 0
while 1:
    mylist = [x%2**(ans+1) for x in A]
    if sum(mylist) > 0:
        break
    else:
        ans += 1
print(ans)

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

ans = 10**10

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

print(ans)

Solution (Python):
count= -1
flag = 1

num_list = [0]*int(input())
num_list = [int(x) for x in input().split()]

while 1:
    i=0
    for x in num_list:
        if x%2==1:
            flag = 0
            break
        else:
            num_list[i]=num_list[i]/2
        i=i+1
    count = count + 1
    if flag==0:
        break


print(count)

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

Solution (Python):
from fractions import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))

g=reduce(gcd,a)
ans=0
while g%2==0:
    g//=2
    ans+=1
print(ans)

Solution (Python):
def check_mod(target_list):
    for target in target_list:
        if int(target) % 2 != 0:
            return False
    else:
        return True


def replace_target(target_list):
    new_list = list()
    for target in target_list:
        new_list.append(int(target) / 2)
    return new_list


def main():
    target_num = input()
    target_list = input().split()

    repeat_count = 0

    while True:
        repeat_flg = check_mod(target_list)
        if repeat_flg:
            target_list = replace_target(target_list)
            repeat_count += 1
        else:
            print(repeat_count)
            break


if __name__ == '__main__':
    main()

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

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

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

cnt = 0
flg = True

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

print(cnt)

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

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


B = []

for e in A:
    cnt = bin(e)[::-1].find('1')
    
    
    B.append(cnt)

print(min(B))

Solution (Python):
n = int(input())
A = {i for i in map(int, input().split())}

B = set()
for e in A:
    cnt = bin(e)[::-1].find('1')
    
    B.add(cnt)

print(min(B))

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

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

while(flag):
  for i in range(len(a)):
    if a[i] % 2 == 0:
      a[i] = a[i] // 2
    else:
      flag = False
      False
  if flag:
    counter += 1
    
print(counter)

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

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

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

ans = 10 ** 6

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

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

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=-1
for i in range(max(a)):
    for j in range(len(a)):
        if a[j]%2==1:
            ans=i
            break
        else:
            a[j]=a[j]//2
    if ans!=-1:
        break
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
even = lambda x: True if x % 2 == 0 else False
div2 = lambda x: x/2
isContinue = True
c = 0
while isContinue:
    for i, v in enumerate(A):
        if even(v):
            A[i] = div2(v)
        else:
            isContinue = False
    if isContinue:
        c += 1
print(c)

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

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

flag = True
count = 0

while(flag):
  for num in nums:
    if(num % 2 == 1):
      flag = False
  
  if(flag):
    nums = list(map(lambda x:x//2,nums))
    count += 1

print(count)

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

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

Solution (Python):
input_line1 = input()
str_list = input().split()
num_list = [int(a) for a in str_list]
flag = True
count = -1
while flag:
    for i in range(len(num_list)):
        if num_list[i] % 2 == 0:
            num_list[i] = num_list[i] // 2
        else:
            flag = False
    count += 1

print(count)

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

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

print(cnt)

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

even_counter = 0
for n in range(N):
  if num_list[n]%2 != 0:
    print('0')
    break
  else:
    even_counter += 1
  
  if even_counter == N:
    min_counter = float('inf')
    for i in range(N):
          num =  num_list[i]
          counter = 0
          while num%2 == 0:
            counter += 1
            num //= 2
          if counter <= min_counter:
            min_counter = counter
      
    print(min_counter)

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

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

count = 0

def judge(L):
    global count
    for i in range(N):
        if L[i]%2 == 0:
            L[i] = L[i]/2
        elif L[i]%2 != 0:
            return count
    count += 1
    judge(L)

judge(A)

print("{}".format(count))

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

Solution (Python):
import fractions
from functools import reduce
N = int(input())
A = list(map(int,input().split()))
num = reduce(fractions.gcd,A)
ans = 0
for i in range(10000):
    if num%2 == 1:
        print(ans)
        exit()
    num /= 2
    ans += 1

Solution (Python):

import sys

MOD = 2  


def solve(N: int, A: "List[int]"):
    ans = 0
    while not any([a & 1 for a in A]):
        for i in range(len(A)):
            A[i] //= 2
        ans += 1
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, A)


if __name__ == "__main__":
    main()

Solution (Python):



N = int(input())

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


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

print(ans)

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

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

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

ans = int(1e9)
for i in range(N):
    cnt = 0
    while(A[i]%2 != 1):
        A[i] = A[i] // 2
        cnt = cnt + 1
    ans = min(ans, cnt)
    
print(ans)

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]//=2
        else:
            print(count)
            exit()
    count+=1

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

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

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

Solution (Python):
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

N = ii()
A = li()
cnt = 0
while all(e % 2 == 0 for e in A):
    cnt += 1
    A = list(map(lambda x: x // 2, A))

print(cnt)

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 = [int(i) for i in input().split()]
cnt = 0
bool = True
while bool:
    for i in range(n):
        if A[i] % 2 == 0:
            A[i] /= 2
        else:
            bool = False
            break
    if bool:
        cnt += 1
print(cnt)

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

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
def ABC_81_B():
    N=int(input())
    A = input().split()
    A = [int(s) for s in A]
    c=0

    for i in range(100):
        for j in range(N-1):
            if A[j]%2 != 0:
                break
            A[j] = A[j]/2
        else:
            c+=1
            continue
        break

    print(c)

if __name__ == '__main__':

    ABC_81_B()

Solution (Python):
import numpy as np

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

A = np.array(A)
counter = 0
while True:
    if all( i%2==0 for i in A):
        counter  += 1
        A = A/2
    else:
        print(counter)
        break

Solution (Python):
from sys import stdin
from math import log2
def I(): return int(stdin.readline().rstrip())
def LI(): return list(map(int,stdin.readline().rstrip().split()))
    
n = I()
a = LI()

ans = int(log2(a[0]))
for i in a: 
    if i%2: 
        print(0)
        exit()
    else:
        for j in range(1,ans+1):
            if i&(1<<j):
                if not ans:
                    ans = j
                elif j<ans:
                    ans = j
                break

print(ans)

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