eval(input());print((sum(bin(int(x))[::-1].index('1')for x in input().split())))
_,a=open(0);print((sum(bin(int(x))[::-1].index('1')for x in a.split())))
eval(input())
print((sum(bin(int(x))[::-1].index("1") for x in input().split())))

_, a = open(0)
print((sum(bin(int(x))[::-1].index("1") for x in a.split())))

-eval(input()) -print((sum(bin(int(x))[::-1].index("1") for x in input().split()))) +_, a = open(0) +print((sum(bin(int(x))[::-1].index("1") for x in a.split())))