n1 = int(eval(input()))



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



cont = 0

for e in lista:

    aux = e

    while(aux%2 == 0):

        aux /= 2

        cont += 1

        



print(cont)
a = int(eval(input()))

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

ans=0



for i in lista:

  while i % 2==0:

    i = i / 2

    ans += 1

    

print(ans)
n1 = int(eval(input()))
lista = list(map(int, input().split()))
cont = 0
for e in lista:
    aux = e
    while aux % 2 == 0:
        aux /= 2
        cont += 1
print(cont)

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

-n1 = int(eval(input())) +a = int(eval(input())) -cont = 0 -for e in lista: -    aux = e -    while aux % 2 == 0: -        aux /= 2 -        cont += 1 -print(cont) +ans = 0 +for i in lista: +    while i % 2 == 0: +        i = i / 2 +        ans += 1 +print(ans)