N = int(eval(input()))

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

cnt = 0

for i in x:

  while i % 2 == 0:

    cnt += 1

    i /= 2

print(cnt)
n = int(eval(input()))

ans = 0

for i in map(int, input().split()):

    cnt = 0

    while i % 2 == 0:

        i >>= 1

        cnt += 1

    ans += cnt

print(ans)
N = int(eval(input()))
x = list(map(int, input().split()))
cnt = 0
for i in x:
    while i % 2 == 0:
        cnt += 1
        i /= 2
print(cnt)

n = int(eval(input()))
ans = 0
for i in map(int, input().split()):
    cnt = 0
    while i % 2 == 0:
        i >>= 1
        cnt += 1
    ans += cnt
print(ans)

-N = int(eval(input())) -x = list(map(int, input().split())) -cnt = 0 -for i in x: +n = int(eval(input())) +ans = 0 +for i in map(int, input().split()): +    cnt = 0 +        i >>= 1 -        i /= 2 -print(cnt) +    ans += cnt +print(ans)