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 = int(input())
a=list(map(int,input().split()))
cnt=0
for i in range((N+1)//2):
    if a[2*i-1] % 2 == 1:
        cnt += 1
print(cnt)
N = int(input())
a=list(map(int,input().split()))
cnt=0
for i in range((N+1)//2):
    if a[2*i] % 2 == 1:
        cnt += 1
print(cnt)