N=int(eval(input()))

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

ans=0

for i in range(N):

    for j in range(40):

        if a[i]%2==0:

            ans+=1

            a[i]//=2

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

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





ans=0

for i in range(N):

    while A[i]%2==0:

        ans+=1

        A[i]//=2

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

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

-a = list(map(int, input().split())) +A = list(map(int, input().split())) -    for j in range(40): -        if a[i] % 2 == 0: -            ans += 1 -            a[i] //= 2 +    while A[i] % 2 == 0: +        ans += 1 +        A[i] //= 2