N=int(eval(input()))

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

c=0

for i in range(N):

    while(a[i]%2==0):

        a[i]=a[i]/2

        c+=1

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

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





c = 0



for i in range(n):

    while(a[i] % 2 == 0):

        c += 1

        a[i] //= 2

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

n = int(eval(input()))
a = list(map(int, input().split()))
c = 0
for i in range(n):
    while a[i] % 2 == 0:
        c += 1
        a[i] //= 2
print(c)

-N = int(eval(input())) +n = int(eval(input())) -for i in range(N): +for i in range(n): -        a[i] = a[i] / 2 +        a[i] //= 2