n = int(eval(input()))

ans = 0

for i in map(int,input().split()):

    a = i

    while a % 2 == 0:

        ans += 1

        a = a // 2

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

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

ans = 0

for i in range(len(ary)):

    a = ary[i]

    if a % 2 == 0:

        while a % 2 == 0:

            ans += 1

            a = a // 2

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

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

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