n = int(eval(input()))

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

cnt = 0

for a in A:

    while a%2 == 0:

        cnt += 1

        a /= 2

print(cnt)

N = int(eval(input()))

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

res = 0

for a in A:

    while a%2 == 0:

        a //= 2

        res += 1

print(res)
n = int(eval(input()))
A = list(map(int, input().split()))
cnt = 0
for a in A:
    while a % 2 == 0:
        cnt += 1
        a /= 2
print(cnt)

N = int(eval(input()))
A = list(map(int, input().split()))
res = 0
for a in A:
    while a % 2 == 0:
        a //= 2
        res += 1
print(res)

-n = int(eval(input())) +N = int(eval(input())) -cnt = 0 +res = 0 -        cnt += 1 -        a /= 2 -print(cnt) +        a //= 2 +        res += 1 +print(res)