N = int(eval(input()))

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

two_num = 0

for i in range(len(A)):

    while A[i] % 2 == 0:

        two_num += 1

        A[i] = A[i] / 2

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

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

cnt = []

for i in range(N):

    cnt_sub = 0

    while a[i] % 2 == 0:

        a[i] = a[i] / 2

        cnt_sub += 1

    cnt.append(cnt_sub)

print((sum(cnt)))
N = int(eval(input()))
A = list(map(int, input().split()))
two_num = 0
for i in range(len(A)):
    while A[i] % 2 == 0:
        two_num += 1
        A[i] = A[i] / 2
print(two_num)

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

-A = list(map(int, input().split())) -two_num = 0 -for i in range(len(A)): -    while A[i] % 2 == 0: -        two_num += 1 -        A[i] = A[i] / 2 -print(two_num) +a = list(map(int, input().split())) +cnt = [] +for i in range(N): +    cnt_sub = 0 +    while a[i] % 2 == 0: +        a[i] = a[i] / 2 +        cnt_sub += 1 +    cnt.append(cnt_sub) +print((sum(cnt)))