N = int(eval(input()))

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

ans = 0

while True:

	odd = 0

	for i in range(N):

		if a[i] % 2 != 0:

			odd += 1

		else:

			a[i] /= 2

			ans += 1

	if odd == len(a):

		break

print(ans)
N = int(eval(input()))

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

ans = 0

while True:

	odd = 0 

	for i in range(len(a)):

		if a[i] % 2 != 0:

			odd += 1

		else:

			a[i] /= 2

			ans += 1

	if odd == len(a):

		break

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

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

-    for i in range(N): +    for i in range(len(a)):