n = int(eval(input()))

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

cnt = 0

for i in ni:

  while not i % 2:

    i /= 2

    cnt += 1

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

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

 

def f(n):

  cnt = 0

  while(n%2==0):

    n = n//2

    cnt +=1

  return cnt

 

total = 0

for e in a:

  total += f(e)

print(total)
n = int(eval(input()))
ni = list(map(int, input().split()))
cnt = 0
for i in ni:
    while not i % 2:
        i /= 2
        cnt += 1
print(cnt)

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


def f(n):
    cnt = 0
    while n % 2 == 0:
        n = n // 2
        cnt += 1
    return cnt


total = 0
for e in a:
    total += f(e)
print(total)

-n = int(eval(input())) -ni = list(map(int, input().split())) -cnt = 0 -for i in ni: -    while not i % 2: -        i /= 2 +N = int(eval(input())) +a = list(map(int, input().split())) + + +def f(n): +    cnt = 0 +    while n % 2 == 0: +        n = n // 2 -print(cnt) +    return cnt + + +total = 0 +for e in a: +    total += f(e) +print(total)