import sys



n = int(eval(input()))

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

ans = sys.maxsize

for an in a:

  cnt = 0

  while an % 2 == 0:

    an /= 2

    cnt += 1

  if cnt < ans:

    ans = cnt

print(ans)
import sys



n = int(eval(input()))

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



# ans = sys.maxsize

# for an in a:

#   cnt = 0

#   while an % 2 == 0:

#     an /= 2

#     cnt += 1

#   if cnt < ans:

#     ans = cnt



ans = 0

isEven = True



while isEven:

  list_tmp = []

  for an in a:

    if an % 2 ==0:

      list_tmp.append(an / 2)

    else:

      isEven = False

      break;

  a = list_tmp

  ans += 1



print((ans - 1))

import sys

n = int(eval(input()))
a = list(map(int, input().split()))
ans = sys.maxsize
for an in a:
    cnt = 0
    while an % 2 == 0:
        an /= 2
        cnt += 1
    if cnt < ans:
        ans = cnt
print(ans)

import sys

n = int(eval(input()))
a = list(map(int, input().split()))
# ans = sys.maxsize
# for an in a:
#   cnt = 0
#   while an % 2 == 0:
#     an /= 2
#     cnt += 1
#   if cnt < ans:
#     ans = cnt
ans = 0
isEven = True
while isEven:
    list_tmp = []
    for an in a:
        if an % 2 == 0:
            list_tmp.append(an / 2)
        else:
            isEven = False
            break
    a = list_tmp
    ans += 1
print((ans - 1))

-ans = sys.maxsize -for an in a: -    cnt = 0 -    while an % 2 == 0: -        an /= 2 -        cnt += 1 -    if cnt < ans: -        ans = cnt -print(ans) +# ans = sys.maxsize +# for an in a: +#   cnt = 0 +#   while an % 2 == 0: +#     an /= 2 +#     cnt += 1 +#   if cnt < ans: +#     ans = cnt +ans = 0 +isEven = True +while isEven: +    list_tmp = [] +    for an in a: +        if an % 2 == 0: +            list_tmp.append(an / 2) +        else: +            isEven = False +            break +    a = list_tmp +    ans += 1 +print((ans - 1))