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):
num = int(input())
s = input().rstrip().split(' ')
s = [ int(x) for x in s]
count = 0
key = True

while key:
    for i in range(num):
        if( s[i] % 2 == 0):
            s[i] = s[i] // 2
        else:
            key = False

    if key:
        count += 1

print(count)

Solution (Python):
num = int(input())
s = input().rstrip().split(' ')
count = 0
key = True

while key:
    for i in range(num):
        s[i] = int(s[i])
        if( s[i] % 2 == 0):
            s[i] = s[i] // 2
        else:
            key = False

    count += 1

print(count - 1)

Solution (Python):
n = int(input())
x = [int(i) for i in input().split()]
answer = 0
while all(i%(2**(answer+1))==0 for i in x):
	answer += 1
print(answer)

Solution (Python):
import numpy as np
n = int(input())
m=1000000000000000000000
a = list(map(int,input().split()))
for i in range(n):
    num=0
    while True:
        if(a[i]%2==0):
            a[i]/=2
            num+=1
        else:
            break

    m = min(m,num)
print(m)

Solution (Python):
import numpy as np
l = int(input())
a = [ np.int(x) for x in input().split() ]
a = np.array(a, dtype = 'int32')
ans = 0
while True:
    b =  a / 2
    c = a // 2
    if (b - c).any():
        break
    else:
        a = b
        ans += 1
print(ans)

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

def inOdd(lst):
    flag = False
    for i in range(len(lst)):
        if lst[i]%2!=0:
            flag = True
            break
    return flag

count = 0
while True:
    if inOdd(A):
        break
    for i in range(len(A)):
        A[i] /= 2
    count += 1
print(count)

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):
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())
Astr = input().split()
A = []
for A_i in Astr:
    A.append(int(A_i))

candidate = 0
end = 0
while end == 0:
    for A_i in A:
        if (A_i/2**(candidate))%2 != 0:
            end = 1
            break
    else:
        candidate += 1
print(candidate)

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

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

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()))
ret = 0
while True:
    for i in range(N):
        if A[i] % 2:
            print(ret)
            exit()
        else:
            A[i] //= 2
    ret += 1

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

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

while x == 0:
    for i in range(n):
        if l[i] % 2 == 0:
            x += 1
            l[i] = (l[i]/2)
        else:
            x = -1
    if x == n:
        a += 1
        x = 0

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

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

count = 0
has_odd = False
while True:
    for i, num in enumerate(board):
        if num % 2 == 0:
            board[i] //= 2
        else:
            has_odd = True
    if has_odd:
        break
    count += 1

print(count)

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

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


if __name__ == "__main__":
    main()

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = na()
ans = 0
flag = 1
while flag:
    for i in range(len(a)):
        if a[i] % 2 == 0:
            pass
        else:
            flag = 0
        a[i] = a[i]/2
    if flag:
        ans += 1
print(ans)

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

end = 0
count = 0

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

print(count)

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

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

Solution (Python):
n = int(raw_input())
l = map(int, raw_input().split())
shift = 1
while all(n % (1 << shift) == 0 for n in l):
  shift += 1
print shift - 1

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

n=int(input())
arr=list(map(int,input().split()))
print(min(list(map(div,arr))))

Solution (Python):
input();a=0
b=list(map(int,input().split()))
while 1:
    for x in b:
        if x>>a&1:
            print(a)
            exit()
    a+=1

Solution (Python):






def count_operation(numbers):
    is_even = True
    count = 0

    while is_even is True:
        elements = divided_by(2 ** (count + 1), numbers)

        if elements.count(0) == number_count:
            count += 1
        else:
            is_even = False
    return count


def divided_by(number, numbers):
    return [element % number for element in numbers]


if __name__ == '__main__':
    number_count = int(input())
    numbers = list(map(int, input().split()))

    result = count_operation(numbers)
    print(result)

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

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

i = 0
while True:
    for j in A:
        if j % 2**(i+1) != 0:
            print(i)
            exit()
    i += 1

Solution (Python):
input();n=eval(input().replace(' ','|'));print((n&-n).bit_length()-1)

Solution (Python):
input()
n = eval(input().replace(' ', '|'))
for i in range(201):
    if n & 1 << i:
        print(i)
        break

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

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

Solution (Python):
import functools
import fractions
import math

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

mod=functools.reduce(fractions.gcd,A)

if mod%2!=0:
    print('0')
    exit()
else:
    print(int(math.log2(mod)))

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)


def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))


def to_bin(x):
    return bin(x)[2:]


def dim2input(N):
    li = []
    for _ in range(N):
        li.append(list(map(int, input())))
    return li

""" input template
S = input()
N = int(input())
L = list(map(int, input().split()))
a, b = list(map(int, input().split()))
SL = list(input())
"""



dp = None

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

    op = 0

    while True:
        for a in A:
            if a % 2 != 0:
                print(op)
                return

        A = list(map(lambda a:a//2, A))
        op += 1

main()

Solution (Python):


N = int(input())
A = list(map(int, input().rstrip().split()))
cnt = 0
perfect = 0
while perfect == 0:
    for i in range(N):
        if A[i] % 2:
            perfect = 1
        else:
            A[i] //= 2
    if perfect == 0:
        cnt += 1
print(cnt)

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

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

Solution (Python):



import sys

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

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

Solution (Python):



import sys
import numpy as np

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

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

Solution (Python):

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

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

        B.append(count)

    print (min(B))

if __name__ == "__main__":
    
    
    main()

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

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

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

print(solve(A))

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

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

Solution (Python):


import sys

n = raw_input().split()[0]
al = [int(e) for e in raw_input().split()]

p = 0
for ai in al:
    p |= ai

n = 0
while True:
    if p & 1:
        break
    p >>= 1
    n += 1

sys.stdout.write('%d\n' % n)
sys.stdout.flush()

Solution (Python):
n = input()
 
a = [int(i) for i in input().split()]
 
max = 1000000000
for i in a:
    sum = 0
    while(i % 2 == 0):
        i /= 2
        sum += 1
    
    if(max > sum):
        max = sum
 
print(max)

Solution (Python):
n = input()

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

max = 1000000000
for i in a:
    sum = 0
    while(i % 2 == 0):
        i /= 2
        sum += 1
    
    if(max > sum):
        max = sum

print(max)

Solution (Python):
num = int(input())
num_list = [int(i) for i in input().split()]
count = 1
Flag = True

while True:
    for i in range(num):
        if num_list[i] % (2 ** count) != 0:
            Flag = False
            break
    if Flag == False:
        break
    count += 1

print(count - 1)

Solution (Python):
n=int(input())
ans=min(map(lambda x:bin(int(x))[::-1].index('1'),input().split()))
print(ans)

Solution (Python):
N = int(input())
print(min(map(lambda x: bin(int(x))[::-1].index("1"), input().split())))

Solution (Python):

"""
https://beta.atcoder.jp/contests/abc081/tasks/abc081_b

"""
import sys
from sys import stdin
input = stdin.readline


def solve(A):
    ans = 0
    divisor = 2

    while True:
        for a in A:
            if a % divisor != 0:
                return ans
        divisor *= 2
        ans += 1


def main(args):
    N = int(input())
    A = [int(x) for x in input().split()]
    ans = solve(A)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
n = int(input())
m = list(map(int,input().split()))
ans = []
cou = 0

for i in range(n):
  while m[i] % 2 == 0:
    m[i] = m[i] / 2
    cou += 1
  ans.append(cou)
  cou = 0
print(min(ans))

Solution (Python):
n = int(input())
m = list(map(int,input().split()))
ans = []
cou = 0

for i in range(n):
  while m[i] % 2 == 0:
    m[i] = m[i] / 2
    cou += 1
  ans.append(cou)
  cou = 0
print(min(ans))

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

Solution (Python):
N = int(input())
numbers =map(int,input().split())
ans = 10000
for i in numbers:
  count = 0
  while i % 2 == 0:
    i /= 2
    count += 1
  ans = min(ans,count)

print(ans)

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

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

Solution (Python):
N=int(input())
A = list(map(int,input().split(' ')))
power=0
trig=0
while power <31 and trig==0:
    p = int(2**power)
    for a in A:
        if int(int(a/p)%2)==1 and trig==0:
            print(int(power))
            trig=1
            break
    power+=1

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

print(ans)

Solution (Python):
N = int(input())
A = map(int, input().split())
ans = 9999
for a in A:
    k = 0
    while a % 2 == 0:
        a /= 2
        k += 1
    ans = min(ans, k)
print(ans)

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

Solution (Python):
N = input()
a = map(int, raw_input().split())
def f():
    ans = 0
    while True:
        for i in range(N):
            if a[i] % (2**ans) != 0:
                return ans-1
        ans += 1
print f()

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

Solution (Python):


def divide(n):
    m = 0
    count = -1
    while m ==0:
        n, m = divmod(n, 2)
        count += 1
    return count

def foo(xs):
    possible = 31
    
    for x in xs:
        possible = min(possible, divide(x))
        if possible == 0:
            return 0
    return possible

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

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

x = 0
y = 0
for k in range(1000000000):
    for i,j in enumerate(A_list):
        if j%2 ==1:
            y += 1
        A_list[i] = j/2
    if y ==0:
        x +=1
    else:
        break
print(x)

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

ans = 0
for i in range(30):
  if [j for j in al if j % 2 == 1]:
    ans = i
    break
  al = [j//2 for j in al]

print(ans)

Solution (Python):
import numpy as np
import pdb

def main():
    N = int(raw_input())
    myarray = np.array(raw_input().split(' ')).astype(int)
    answer = process(myarray)
    print answer

def process(myarray):
    turn = 0
    possible = True
    while(possible):
        possible =  (np.sum(np.mod(myarray, 2)) == 0)
        if possible:
            turn += 1
            myarray = myarray / 2

    return turn

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
c = 0
while len([x for x in a if x % 2 == 1]) == 0:
    a = [x // 2 for x in a]
    c += 1
print(c)

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

def half(n):
    return n / 2

def check_odd(n):
    if n % 2 != 0:
        return False
    else:
        return True
flg = list(map(check_odd,arr))

while False not in flg:
    arr = list(map(half,arr))
    flg = list(map(check_odd,arr))
    ans += 1
print(ans)

Solution (Python):
import math

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

while n >= 0:
    for a in A:
        if a%2 == 1:
            print(n)
            d += 1
            break
    if d > 0:
        break
    A = [a/2 for a in A] 
    n += 1

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

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

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

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

print(j)

Solution (Python):



N = int(raw_input())
A = map(int, raw_input().split())
result = 0

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

print result

Solution (Python):

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

cnt = 0

while True:
    s = sum(list(map(lambda elem: elem % 2, x)))
    if s != 0:
        break
    cnt += 1
    x = list(map(lambda elem: elem // 2, x))

print(cnt)

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

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

def count(a):
    if a % 2 == 0:
        return 1 + count(a // 2)
    else:
        return 0;

print(min(map(count, xs)))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
def test(x):
    count=0
    while x%2==0:
        count+=1
        x/=2
    return count
ans=min(map(test,a))
print(ans)

Solution (Python):
N=input()
S=map(int,input().split())
sum=0
for num in S:
  sum=sum|num

for i in range(200):
  if sum>>i&1==1:
    print(i)
    break

Solution (Python):

def isEven(s):
    for i in s:
        if(i%2==0):
            continue
        else:
            return False
    return True

n=int(input())
a=list(map(int, input().split()))
c=0
while isEven(a):
    for i in range(n):
        a[i]=a[i]/2
    c+=1

print(c)

Solution (Python):
def kisu(s,num):
    for n in range(len(s)):
        if s[n]%2 == 1:
            return s,num,1
        s[n] = s[n]/2
    return s,num+1,0

n = int(input())
check = 0
num = 0
a = list(map(int,input().split()))
while check == 0:
    a,num,check = kisu(a,num)
print(num)

Solution (Python):

import  math

def divide_by_two(i, k):
    if i % 2 == 0:
        i = i /2
        k += 1
        k = divide_by_two(i, k)
    else:
        return k
    
    return k
            

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

min = math.log2(10**9)


for i in range(N):
    k = divide_by_two(line_number[i], 0)
    
    if k <= min:
        min = k
        
print(min)

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

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

ans=a[0]
for i in range(1,n):
    ans = fractions.gcd(ans,a[i])

count = 0

while ans % 2 ==0:
    count +=1
    ans = ans //2
    
print(count)

Solution (Python):
input();print(min((a&-a).bit_length()-1for a in map(int,input().split())))

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

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

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

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

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

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


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



count=0
while True:
    flag=0

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

            flag+=0
            a[i]=a[i]/2
        else:
            flag+=1

    if(flag!=0):
        break
    else:
        count+=1


print(count)

Solution (Python):
def pow(n):
	if n%2==1:
		return 0
	return 1+pow(n/2)


input()
print(min([pow(int(x)) for x in input().split()]))

Solution (Python):
N = input()
A = list(map(int, input().split(' ')))
finish = False
can = 0
A_len = len(A)

while not finish:
    for num, soe in zip(A, range(A_len)):
        if num % 2 == 0:
            A[soe] = num / 2
        else:
            finish = True
    if finish:
        break
    can += 1

print(can)

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

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


for i in range(n):
    ans.append(0)
    while a[i] % 2 == 0 and a[i] != 0:
        ans[i] += 1
        a[i] = a[i]//2
    
print(min(ans))

Solution (Python):
input()
a = map(int, raw_input().split())
print max(j for j in range(32) if all(i % 2 ** j == 0 for i in a))

Solution (Python):

"""
Created on Wed Dec 20 11:39:53 2017

"""

def judge(AList, result):
    
    AList_by2 = []
    
    for A in AList:
        if A % 2 == 1:
            return result
        else:
            AList_by2.append(A/2)
    
    result += 1
    return judge(AList_by2, result)
        
    
    

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

print(judge(AList,0))

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

Solution (Python):
def bsf(x):
    k = 0
    while x&1 == 0:
        k += 1
        x >>= 1
    return k

n = input()
print(min(list(map(bsf,map(int,input().split())))))

Solution (Python):
def check_even(a_list):
    flag = True
    for i, a in enumerate(a_list):
        if a%2 == 1:
            flag = False
            break
        a_list[i] = a//2
    return a_list, flag


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

    cnt = 0
    while True:
        a_list, flag = check_even(a_list)
        if not flag:
            break
        cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):

def sr(n):
    ans = 0
    while n & 1 == 0:
        n >>= 1
        ans += 1
    return ans

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

Solution (Python):

N = int(input())
A = list(map(int, input().split()))
ans = 0
while not list(filter(lambda x: x % 2 == 1, A)):
    A = list(map(lambda x: x / 2, A))
    ans += 1

print(ans)

Solution (Python):



def x():
    n = input()
    a = map(int, raw_input().split())
    c = 0
    while True:
        for i in range(0, n):
            if a[i] % 2 == 0:
                a[i] /= 2
            else:
                return c
        c += 1

print x()

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

    ans = 0
    while True:
        odd_count = [a for a in A if a % 2 != 0]
        if len(odd_count) >= 1:
            break

        ans += 1
        A = [a // 2 for a in A]

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
def solve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    while True:
        if all([x % 2 == 0 for x in A]):
            ans += 1
            A = list(map((lambda x: x//2), A))
        else:
            print(ans)
            return
    
solve()

Solution (Python):
def div(x):
    c = 0
    while not x % 2:
        x /= 2
        c += 1
    return c


N = int(input())
print(min([div(a) for a in map(int, input().split(' '))]))

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

while True:
    odd = True
    for i in a:
        if i % 2 != 0:
            odd = False
            break

    if odd:
        for i in range(len(a)):
            a[i] = a[i] / 2
        count += 1
        continue
    else:
        break

print(count)

Solution (Python):
import math
N = int(input())
A = [int(a) for a in input().split()]
ct = 0

def dim2(n):
    if n%2 == 0:
        return dim2(n/2)+1
    else:
        return 0

B = [dim2(a) for a in A]
print(min(B))

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

min=32

for i in A:
        j=0
        while i%2==0:
                i/=2
                j+=1
        if j < min:
                min=j

print(min)

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

count = 0
i = 2
while True:
    if len(a) == len(list(filter(lambda x: x%i==0, a))):
        count += 1
        i *= 2
    else:
        print(count)
        break

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

ans = 0

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

Solution (Python):


"""
Created on Thu Dec 14 22:24:31 2017

@author: Kanoh
"""
import numpy as np
N = int(raw_input())
A = raw_input()
A_split=A.split(" ")
A_int=np.zeros((N))

for i in range(int(N)):
    A_int[i]=int(A_split[i])

counter=0
checker=0
while 1 :
    for i in range(N):
        if((A_int[i]%2)!=1) and((A_int[i])>1):
            A_int[i]=A_int[i]/2
        else:
            checker=1
    if(checker==1):
        break
    else:
        counter=counter+1
    
print counter

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

def main():
    count = 0
    nums = A
    end = False
    while not end:
        for i in range(N):
            dm = divmod(nums[i], 2)
            if dm[1] != 0: 
                end = True
                break
            nums[i] = dm[0] 
        else:
            count += 1
    print(count)

if __name__ == '__main__':
    main()

Solution (Python):

import sys

n=int(raw_input())
a=map(int,raw_input().split())
res=float('inf')
for x in a:
 temp=0
 while x%2==0:
  temp+=1
  x/=2
 res=min(temp,res)
print res

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

    count = -1
    flag = True
    while flag:
        count = count +1
        for i in A:
            if i%2!=0:
                flag = False
        if flag: A = [i/2 for i in A]
    print(str(count))

main()

Solution (Python):
n = input()
xs = input().split(' ')
xs = [int(x) for x in xs]
xs = set(xs)
xs = list(xs)
xs.sort()
a = [x for x in xs if x % 2 == 1]
if len(a) > 0:
    print(0)
else:
    m = 10 ** 9
    for x, y in zip(xs[:-1], xs[1:]):
        q = y - x
        if q < m:
            m = q
    if m > xs[0]:
        m = xs[0]
    count = 0
    while m % 2 == 0:
        count += 1
        m = m / 2
    print(count)

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

counter, i = 0, 0
new_list = []
while(True):
    if list[i] % 2 != 0:
        print(counter)
        break
    else:
        new_list.append(list[i] / 2)
        i += 1

    if i == n:
        list.clear()
        for e in new_list:
            list.append(e)
        new_list.clear()
        counter += 1
        i = 0

Solution (Python):
N = int(input())
a = input().split(' ')
c = 0


def check(a):
    global c

    for i in a:
        if int(i) % 2 == 1:
            return
    for i in a:
        a[a.index(i)] = int(i)/2
        if int(i)/2 == 1:
            c += 1
            return
    c += 1
    check(a)


check(a)
print(c)

Solution (Python):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
 
n = int(input())
a = map(int, input().split())
ans = min(map(how_many_times_divisible, a))
 
print(ans)

Solution (Python):
_ = input()
a = map(int, raw_input().strip().split())
minNum = 999
for num in a:
    if bin(num)[2:][::-1].index('1') < minNum:
        minNum = bin(num)[2:][::-1].index('1') 
print minNum

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

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

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