N = int(eval(input()))

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



ans = 0

for i in range(N) :

    flag = 0

    while flag == 0 :

        if (L[i] % 2) == 0 :

            ans += 1

            L[i] = L[i]//2

        else :

            flag = 1

print(ans)

N = int(eval(input()))

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



ans = 0

for i in range(len(A)) :

    while True :

        if A[i] % 2 != 0 :

            break

        ans += 1

        A[i] //= 2

print(ans)

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

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

-L = list(map(int, input().split())) +A = list(map(int, input().split())) -for i in range(N): -    flag = 0 -    while flag == 0: -        if (L[i] % 2) == 0: -            ans += 1 -            L[i] = L[i] // 2 -        else: -            flag = 1 +for i in range(len(A)): +    while True: +        if A[i] % 2 != 0: +            break +        ans += 1 +        A[i] //= 2