import math

n = eval(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)))
import math

n = eval(input())

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

ans = float("inf")

for i in a:

    b = len(bin(i)) - bin(i).rfind("1") - 1

    ans = min(ans, b)

print((round(ans)))
import math

n = eval(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)))

import math

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

-    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1) +    b = len(bin(i)) - bin(i).rfind("1") - 1 +    ans = min(ans, b)