a=[int(eval(input()))for _ in[0]*int(eval(input()))]

m=a[-1]+1

def f(S):

 x=1

 while 2*x*-~x<m:

  if(S-x)%(2*x+1)==0:return 0

  x+=1

 return 1

print((sum(f(S)for S in a)))

a=0

for _ in[0]*int(eval(input())):

 n=int(eval(input()))

 for i in range(1,int(n**.5)+1):

  if(n-i)%(2*i+1)==0:break

 else:a+=1

print(a)

a = [int(eval(input())) for _ in [0] * int(eval(input()))]
m = a[-1] + 1


def f(S):
    x = 1
    while 2 * x * -~x < m:
        if (S - x) % (2 * x + 1) == 0:
            return 0
        x += 1
    return 1


print((sum(f(S) for S in a)))

a = 0
for _ in [0] * int(eval(input())):
    n = int(eval(input()))
    for i in range(1, int(n**0.5) + 1):
        if (n - i) % (2 * i + 1) == 0:
            break
    else:
        a += 1
print(a)

-a = [int(eval(input())) for _ in [0] * int(eval(input()))] -m = a[-1] + 1 - - -def f(S): -    x = 1 -    while 2 * x * -~x < m: -        if (S - x) % (2 * x + 1) == 0: -            return 0 -        x += 1 -    return 1 - - -print((sum(f(S) for S in a))) +a = 0 +for _ in [0] * int(eval(input())): +    n = int(eval(input())) +    for i in range(1, int(n**0.5) + 1): +        if (n - i) % (2 * i + 1) == 0: +            break +    else: +        a += 1 +print(a)