We have N squares assigned the numbers 1,2,3,\ldots,N. Each square has an integer written on it, and the integer written on Square i is a_i.  How many squares i satisfy both of the following conditions?    * The assigned number, i, is odd.   * The written integer is odd.
n=input()
x=list(map(int,input().split()))

ans=0
for i in x[1::2]:
    if i%2==1:
        ans+=1
n=input()
x=list(map(int,input().split()))
ans=0
for i in x[0::2]:
    if i%2==1:
        ans+=1
print(ans)