def two_count(x):

	if int(str(x)[-1]) % 2 == 0:

		return 1 + two_count(x//2)

	else:

		return 0



n = int(eval(input()))

n_list = [int(n) for n in input().split(" ")]



n_two_count_list = [two_count(n) for n in n_list]



print((min(n_two_count_list)))
def two_count(x):

	if x % 2 == 0:

		return 1 + two_count(x//2)

	else:

		return 0



n = int(eval(input()))

n_list = [int(n) for n in input().split(" ")]



n_two_count_list = [two_count(n) for n in n_list]



print((min(n_two_count_list)))
def two_count(x):
    if int(str(x)[-1]) % 2 == 0:
        return 1 + two_count(x // 2)
    else:
        return 0


n = int(eval(input()))
n_list = [int(n) for n in input().split(" ")]
n_two_count_list = [two_count(n) for n in n_list]
print((min(n_two_count_list)))

def two_count(x):
    if x % 2 == 0:
        return 1 + two_count(x // 2)
    else:
        return 0


n = int(eval(input()))
n_list = [int(n) for n in input().split(" ")]
n_two_count_list = [two_count(n) for n in n_list]
print((min(n_two_count_list)))

-    if int(str(x)[-1]) % 2 == 0: +    if x % 2 == 0: