peterverebics/CodeNet_Python_118 huggingface dataset:
N=int(input())
c=list(input())
k=0
for i in range(N):
    if c[i]!='R':
        k=i
        break
R=c[k:].count('R')
W=c[k:k+R+1].count('W')
if c.count('W')==N:
    W=N
print(W)
N = int(input())
S = input()


def calculate(n, s):
    arr = list(s)
    result = []

    leftW = 0
    rightR = arr.count('R')

    for i in range(n):
        val = arr[i]

        if val == 'R':
            rightR -= 1

        if val == 'W':
            leftW += 1

        result.append(max(leftW,rightR))

    if len(result) == 0:
        print(0)
    else:
        print(min(result))

calculate(N, S)
n = int(input())
A = list(input())

if A.count('R')==n:
    print(0)
elif A.count('W')==n:
    print(0)
else:
    cnt = max(A[:0].count('W'),A[0:].count('R'))
    mini = cnt
    for i in range(1,n-1):
        if A[i] == 'W':
            cnt += 1
        else:
            cnt -= 1
            mini = min(cnt,mini)
    print(mini)
n = int(input())
c = input()
ans = 0
c1 = len(c)//2
cnt_w = 0
cnt_r = 0
for i in range(c1):
  if c[i]=='W':
    cnt_w += 1
for i in range(c1,len(c)):
  if c[i]=='R':
    cnt_r += 1

ans = cnt_w if cnt_w <= cnt_r else cnt_r

print(ans)
import math
N=int(input())
c=input()
if c.count("R")==0 or c.count("W")==0:
    print(0)
else:
    W_count=0
    R_count=0
    for i in range(math.ceil(N/2)):
        if c[i]=="W":
            W_count+=1
        else:
            R_count+=1
    print(min(c.count("R"),c.count("W"),max(W_count,R_count)))
N=int(input())
C=list(input())
nR=-1
nW=0
u=0
for i in range(N):
    if C[i]=='W':
        nW=nW+1
    else:
        u=i
        break
if u!=0:
    for i in range(N-u):
        if C[i+u]=='R':
            nR=nR+1
if nW<=nR:
    print(nR)
if nW>nR:
    print(nR+1)
import collections as c
n = int(input())
s = list(input())
mr = s.count("R")
mw = s.count("W")
cnt = 0

r = 0
w = 0

for i in s:
    if w>=mr-r:
        print(cnt)
        break
    if i == "R":
        r += 1
    else:
        w += 1
    cnt += 1
N=int(input())
c=list(str(input()))
ans=0
wl=0
for r in range(N-1,-1,-1):
  if r=='W':
    print('a')
    continue
  for w in range(wl,r):
    if c[w]=='W':
      c[w],c[r]='R','W'
      wl=w+1
      ans+=1
      break
print(ans)
k = int(input())
s = list(input())

count=0
for i in range(int(k/2)):
    if s[i]=="W":
        count+=1
print(count)
n=int(input())
s=input()

cntw=[0]*(n+1)
totr=0
totw=0

for i in range(n):
    if s[i]=='W':
        cntw[i+1]=cntw[i]+1
        totr+=1
    else:
        cntw[i+1]=cntw[i]
        totw+=1
ans=10**6
for i in range(n+1):
    w=cntw[i]
    r=n-i-(totw-cntw[i])
    ans=min(ans,max(w,r))

print(ans)
k = int(input())
s = input()

if len(set(s)) == 1:
    print(0)
    exit()

left_r = s[:k//2].count('R')
left_w = (k//2) - left_r

right_r = s[k//2:].count('R')
right_w = (k//2) + 1 - right_r

res = min(left_w, right_r)

if right_r and not left_w:
    print(min(right_w, right_r))
else:
    print(res)
n = int(input())
c = input()
_trigger = False
ans = 0
_count = c.count('R')
for i in range(n):
  if c[i] == 'W':
    _trigger = True
  else:
    if _trigger and i + 1 >= _count:
      ans += 1
print (ans)
N = int(input())
a = input()
wc = int(0)
rc = int(0)
c = int(0)

for i in range(N):
  if a[i] == "W":
    wc += 1
  else:
    rc += 1

if rc == 0:
  print("0")
else:
  for i in range(rc):
    if a[i] == "W":
      c += 1
    print(c)
n = int(input())
c = input()

if len(c) % 2 == 0:
    w_count = c[:len(c)//2].count("W")
    r_count = c[len(c)//2:].count("R")
else:
    w_count = c[:len(c)//2 + 1].count("W")
    r_count = c[len(c)//2:].count("R")
    
if (w_count == 0)|(r_count==0):
    print(0)
else:
    print(w_count) if w_count < r_count else print(r_count)
# N = 8
# S = "WRWWRWRR"
#
# N = 2
# S = "RR"
#
# N = 4
# S = "WWRR"

N = int(input())
S = input()

def calculate(n, s):
    arr = list(s)

    RNum = arr.count("R")

    leftW = 0
    rightR = RNum

    result = []
    for i in range(n):
        if arr[i] == "R":
            rightR -= 1
        if arr[i] == "W":
            leftW += 1

        result.append(max(leftW, rightR))

    print(min(result))


calculate(N, S)
N = int(input())
RW = input()

j = N-1
count = 0
for i in range(N//2):
    if RW[i]=='W':
        while i<j:
            if RW[j]=='R':
                count += 1
                break
            j -= 1

print(count)
N = int(input())
C = input()

ans = 0
w = C.count("W")
r = C.count("R")

if w < r:
    print(C[0:w].count("W"))
else:
    print(C[w:len(C)].count("R"))
N = int(input())
C = list(input())
W = 0
R = 0
for i in range(0,int(N/2+1)):
    if C[i] == 'W':
        W += 1
for i in range(int(N/2+1),N):
    if C[i] == 'R':
        R += 1
if W >= R:
    print(R)
else:
    print(W)
n = int(input())
s = input()
res = 2000000 
#aw=s.count('W')
ar=s.count('R')
pw=0
pr=0
for i in range(n-1):
	if (s[i] == 'R'):
		pr=pr+1
	else:
		pw=pw+1
	if (max(pw,ar-pr) < res):
		res = max(pw,ar-pr)

print(str(res))
from collections import Counter
import sys
n = int(input())
c = input()
s = Counter(c)
if s['W'] == 0 or s['R'] == 0 or c.index('R') == 0 and c.index('W') == s['R']:
  print('0')
  sys.exit()
r = s['R']
las_pos=0
count = 0
for i, v in enumerate(c):
  if v == 'R':
    if i - las_pos < r:
      r = r - (i - las_pos + 1)
      count += (i - las_pos)
      las_pos = i
    else:
      count += r
      break
print(count)
n = int(input())
c = list(input())

if n % 2 == 0:
  half = int(n / 2)
  odd =0
else:
  half = int((n-1) / 2)
  odd = 1
pre_w_num = 0
for i in range(half):
  if c[i] == "W":
    pre_w_num = pre_w_num + 1
post_r_num = 0
for j in range(half):
  if c[-1 *(j+1)] == "R":
    post_r_num = post_r_num +1
if pre_w_num <= post_r_num:
  ans = pre_w_num
else:
  ans = post_r_num
if odd == 1:
  if c[half] == 'R':
    ans = ans +1
print(ans-1)
n = int(input())
*a, = map(int, input().split())
print(sum(i%2 for i in a[::2]))
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0, n, 2):
    if a[i] % 2 == 1:
        ans += 1
print(ans)
N = int(input())
A = [int(_) for _ in input().split()]

ans = 0
for i, a in enumerate(A):
    if i % 2 == 0 and a % 2 == 1:
        ans += 1
print(ans)
N = int(input())
A = [int(x) for x in input().split()]

C = 0
for i in range(0,N,2):
  if A[i] % 2 == 1:
  	C += 1
    
print(C)
n = int(input())

count = 0

for idx, a_i in enumerate(list(map(int, input().split()))):
    
    if (idx + 1) % 2 != 0 and a_i % 2 != 0:
        count += 1

print(count)
N = int(input())
a = [0] + list(map(int, input().split()))
cnt = 0
for i in range(1, N+1):
    ai = a[i]
    if i%2 == 1 and ai%2 == 1:
        cnt += 1
print(cnt)
mass = int(input())
nums = list(map(int, input().split()))
c = 0
for i  in range(len(nums)):
    if nums[i]%2 ==1:
        i += 1
        if i%2 == 1:
            c += 1
            
print(c)
N = int(input())
a = list(map(int,input().split()))

cnt=0
for i in range(N):
    if (i+1)%2==1 and a[i]%2==1:
        cnt+=1

print(cnt)
n=int(input())
a=input().split()
cnt=0
for i in range(0,n,2):
    if(int(a[i])%2!=0):
        cnt=cnt+1
print(cnt)
def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = 0
    for i in range(N):
        if i%2==0 and A[i]%2==1:
            cnt += 1

    print(cnt)



if __name__ == '__main__':
    main()
n = int(input())
a = list(input().split())

a = [int(a[i]) for i in range(n)]
ans = 0
for j in range(n):
    if j%2 == 0 and a[j]%2 == 1:
        ans = ans + 1

print(ans)
inpl = lambda: list(map(int,input().split()))
N = int(input())
A = inpl()
print(sum(A[i]%2 for i in range(0,N,2)))
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a[::2]:
  if i % 2 == 1:
    ans += 1
print(ans)
n = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(n):
    if A[i] % 2 == 1 and (i + 1) % 2 == 1:
        ans += 1
print(ans)
n = int(input())
a = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
    if a[i]%2==1 and (i+1)%2==1:
        cnt +=1
print(cnt)
n = int(input())
a = [int(i) for i in input().split()]
c = 0
for i in range(0,n,2):
    if a[i] % 2 == 1:
        c += 1
print(c)
N=int(input())
a=list(map(int,input().split()))

ans=0
for i in range(0,N,2):
    if a[i]%2==1:
        ans+=1
print(ans)
import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.buffer.read


N = int(readline())
A = list(map(int, read().rstrip().split()))
A = A[::2]
B = [a for a in A if a % 2 == 1]
print(len(B))
import collections
from functools import lru_cache


def read():
    return input().strip()


def readInt():
    return int(input().strip())


def readList():
    return list(map(int, input().strip().split()))


def solve(n, arr):
    ans = 0

    for i, val in enumerate(arr, 1):
        if i & 1 and val & 1:
            ans += 1

    return ans


n = readInt()
arr = readList()

print(solve(n, arr))
n = int(input())
a = list(map(int,input().split()))
ans = 0

for i in range(n):
    if ((i+1) * a[i]) % 2 != 0:
        ans += 1

print(ans)
N = int(input())
nums = list(map(int, input().split()))

cnt = 0

for i in range(N):
    num = i + 1
    
    if (num % 2 == 1 and nums[i] % 2 == 1):
        cnt += 1
        

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

for i in range(0, n, 2):
    if a[i]%2 == 1:
        ans += 1

print(ans)
N = int(input())
a = list(map(int, input().split()))
count = 0

for i in range(0, N, 2):
    if a[i] % 2 == 1:
        count += 1

print(str(count))
N = int(input())
A = [int(s) for s in input().split()]

count = 0
for i in range(0, N, 2):
  if A[i] % 2 == 1:
    count += 1
    
print(count)
N = int(input())

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

ans = 0
for i in range(N):
    if (i + 1) % 2 == 1 and a[i] % 2 == 1:
        ans += 1
print(ans)
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

N = int(input())
Als = inpl()

count= 0
for i,item in enumerate(Als):
    if (i%2 == 0) and (item % 2 != 0):
        count += 1
print(count)
# 幅優先探索（行きがけ）
import collections
import sys


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = I()
    Aarray = LI()
    cnt = 0
    for i in range(N):
        if i % 2 == 0 and Aarray[i] % 2 != 0:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()
N=int(input())
a=[int(x) for x in input().split()]
cnt=0
for i in range(N):
  if i%2==0 and a[i]%2==1:
    cnt+=1
print(cnt)
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
a = LI()
ans = 0
for i, A in enumerate(a):
    if (i+1) % 2 == 1:
        if A % 2 == 1:
            ans += 1
print(ans)
N = int(input())
arr = list(map(int, input().split()))
count = sum([ 1 for x in arr[::2] if x % 2 == 1])
print(count)
#import numpy as np
#import functools
#import operator
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with
#from itertools import permutations as perm
#import collections as C #most_common
#import math
#import sympy

N = int(input())
#N,K,d= map(int,input().split())
A = list(map(int,input().split()))
#S = str(input())
#T = str(input())
c=0

for i in range(1,N+1):
    if i%2!=0 and A[i-1]%2!=0:
        c+=1
print(c)
N = int(input())
a = list(map(int,input().split()))

ans = 0
for i in range(0,N,2):
    if a[i]%2==1:
        ans+=1

print(ans)
N = int(input())
a = list(map(int, input().split()))

cnt = 0
for i in range(N):
    if (i+1) % 2 == 1 and a[i] % 2 == 1:
        cnt += 1

print(cnt)
N = int(input())
A = list(map(int,input().split()))
cnt = 0
if len(A)%2==0:
    q = N//2
else:
    q = N//2 + 1
for i in range(q):
  if A[2*i]%2!=0:
    cnt += 1
print(cnt)
n=int(input())
a=list(map(int,input().split()))
b=0
for i in range(n):
    if i%2==0 and a[i]%2==1:
        b+=1
print(b)
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
A = A.reshape((int(N/2), 2))[:,0] if N % 2 == 0 else np.append(A, 2, 100).reshape((int((N+1)/2), 2))[:, 0]
print((A % 2 == 1).sum())
#!/usr/bin/env python

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

def main():
    N = int(input())
    A = list(map(int,input().split()))

    ans = 0
    for i in range(N):
        if i%2 == 0 and A[i]%2 == 1:
            ans += 1
    
    print(ans)

if __name__ == "__main__":
    main()
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    n = int(input())
    a = list(map(int, input().split()))
    ans = 0
    for i in range(n):
        if (i+1) % 2 == 1 and a[i] % 2 == 1:
            ans += 1
    print(ans)
    return 0

if __name__ == "__main__":
    solve()
n=input()
print(len([a for a in list(map(int,input().split()))[::2] if a%2]))
import sys
from io import StringIO
import unittest
import numpy as np

def resolve():
    li = sys.stdin.readlines()
    N = int(li[0].strip())
    a = list(map(int, li[1].strip().split(' ')))
    A = np.array(a[0::2])
    A = (A % 2 == 1)
    print(A.sum())
resolve()
n = int(input())
aas = list(map(int, input().split()))
res = 0
for i in range(n):
    if (i+1)%2!=0 and aas[i]%2!=0:
        res += 1
print(res)
a = int(input())
s = 0
b = input().split(" ")
i = 1
while i <= a :
    if (i % 2 == 1) and (int(b[i-1]) % 2 == 1)  :
        s = s + 1
    i = i + 1
print(s)
n = int(input())
a = list(map(int, input().split()))
c = 0
for i in range(0, n, 2):
    if a[i] % 2 != 0:
        c += 1
print(c)
n = int(input())
a = list(map(int, input().split()))
c = 0

for i in range(n):
    if (i+1) % 2 != 0 and a[i]%2 != 0:
        
        c += 1

print(c)
n=int(input())
a_list=[int(i) for i in input().split()]

count=0
for i in range(n):
    if (i+1)%2!=0 and a_list[i]%2!=0:
        count+=1
        
print(count)
n=int(input())
c=list(map(int, input().split())) 

c = [0] + c
ans = 0

for i in range(1,n+1):
    if i%2 == 1 and c[i]%2 ==1:
        ans += 1

print(ans)
#!/usr/bin/env python3
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    if (i + 1) % 2 == 1 and a[i] % 2 == 1:
        ans += 1
print(ans)
N = int(input())
a = list(map(int, input().split()))

ans = 0

for  i in range(0, N, 2):
    if a[i] % 2 == 1:
        ans += 1
    else:
        pass

print(ans)
n=int(input())
a_list = list(map(int,input().split()))    

count = 0
for i in range(1, n+1):
    if i % 2 == 1 and a_list[i-1] % 2 == 1:
        count += 1
print(count)
N = int(input())
a=list(map(int,input().split()))
c = 0
for i in range(N):
  if i%2==0:
    if a[i]%2==1:
      c = c+1
print(c)
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    if(i+1)%2==1 & a[i]%2==1:
        ans +=1
print(ans)
n = int(input())
L = list(map(int,input().split()))
cnt = 0
for i in range(n):
    if (i+1)%2 == 1 and L[i]%2 == 1:
        cnt +=1
print(cnt)
N = int(input())
A = list(map(int, input().split()))
cnt=0
for i in range(1,N+1):
    if A[i-1]%2==1 and i%2==1:
        cnt+=1
print(cnt)
n = int(input())
a = list(map(int,input().split()))
ans = 0

for i in range(n):
  if (i+1)%2 == 1 and a[i]%2 ==1:
    ans += 1
print(ans)
n=int(input())
count=0
a = input().split(" ")
lista = [int(n) for n in a]
for i in range(0,n,2):
  if lista[i]%2==1:
    count+=1
print(count)
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(0,len(a),2):
    if a[i]%2==1:
        cnt += 1
print(cnt)
n = int(input())
list = [int(i) for i in input().split()]
ans = 0
for i in range(n):
    if i%2==0 and list[i]%2==1:
        ans += 1
print(ans)
n=int(input())
a_list= list(map(int, input().split()))
count=0
for i in range(n) :
  if i%2==0 and a_list[i]%2==1 :
    count+=1
    
print(count)
#B
N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N):
    if (i+1)%2==1 and A[i]%2==1:
        ans+=1
        
print(ans)
print(sum(map(lambda x:int(x)%2,open(0).read().split()[1::2])))
N = int(input())
a_list = list(map(int, input().split()))

count = 0
for i in range(1,N+1):
    if a_list[i-1] % 2 == 1 and i % 2 == 1:
        count += 1
print(count)
n=int(input())
l=[int(i) for i in input().split()]
c=0
for i in range(n):
    if (i+1)%2==1 and l[i]%2==1:
        c+=1
print(c)
N = int(input())
a_list = list(map(int, input().split()))
count = 0
for i in range(N):
  if i%2==0 and a_list[i]%2==1:
    count = count + 1
print(count)
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(readline())
    A = list(map(int, readline().split()))

    ans = 0
    for i in range(0,N,2):
        if A[i]%2==1:
            ans += 1

    print(ans)
if __name__ == '__main__':
    main()
ans=0
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    if (i+1) % 2 == 0:
        continue
    if a[i]%2!=0:
        ans+=1
print(ans)
N = int(input())
a_list = [int(a) for a in input().split()]
count = 0
for n in range(N):
    if (n + 1) % 2 == 1 and a_list[n] % 2 == 1:
        count += 1
print(count)
N = int(input())
A = list(map(int, input().split()))
print(len([a for a in A[::2] if a%2==1]))
def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = 0
    for i in range(n):
        if i%2 == 0 and a[i]%2 == 1:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()
#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    A=list(map(int,input().split()))
    cnt=0
    for i in range(N):
        if A[i]%2==1 and i%2==0:
            cnt+=1
    print(cnt)
    
    
    
if __name__=="__main__":
    main()
N = int(input())

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

count = 0
for i in range(0, N, 2):
    if(a_list[i] % 2 == 1):
        count += 1

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

ans = 0
for i in range(n):
    if (i + 1) % 2 == 1:
        if a[i] % 2 == 1:
            ans += 1
print(ans)
N=int(input())
*A,=map(int,input().split())
ans=0
i=0
while i<N:
    if i%2==0 and A[i]%2==1:
        ans+=1
    i+=1
print(ans)
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

n=II()
aa=LI()
ans=0
for i,a in enumerate(aa,1):
    if i&1 and a&1:ans+=1
print(ans)
n = int(input())
a = list(map(int, input().split()))
ans = 0

for i in range(n):
  if i % 2 == 0 and a[i] % 2 != 0:
    ans += 1
    
print(ans)
n = int(input())
a = list(map(int, input().split()))
c = 0
for x in range(1, n+1):
	if x & 1 and a[x-1] & 1:
		c += 1
print(c)
N = int(input())
a_list = list(map(int, input().split()))

cnt = 0
for i, a in enumerate(a_list, 1):
    if i%2==1 and a%2==1:
        cnt += 1
print(cnt)
import sys

N = int(input())
A = list(map(int, sys.stdin.readline().rsplit()))

res = 0
for i, a in enumerate(A):
    if (i + 1) % 2 == 1 and a % 2 == 1:
        res += 1
print(res)
n = int(input())
line = [int(x) for x in input().split()]
count = 0
for i in range(0, n, 2):
    if line[i] % 2 != 0:
        count += 1
print(count)
N = int(input())
A = list(map(int, input().split()))

ans = 0
for i in range(0, N, 2):
    if A[i] % 2 == 1:
        ans += 1

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

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

cnt = 0

for i in range(1, n+1):
    cnt += (i%2==1) and (a[i-1]%2==1)

print(cnt)
n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(n):
  if (i+1)%2!=0:
    if a[i]%2!=0:
      count+=1
      
print(count)
N = int(input())
L = list(map(int, input().split()))
ans = 0
for i, l in enumerate(L):
  if i % 2 != 1 and l % 2 == 1:
    ans += 1
print(ans)
N = int(input())
a = list(map(int,input().split()))

if(N%2 == 0):
  N = int(N/2)
else:
  N = int(N/2)+1
count = 0
for i in range(1,N+1):
  if(a[(2*i-1)-1]%2 == 1):
    count += 1
print(count)
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    if i%2==0 and a[i]%2==1:
        ans+= 1
print(ans)
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    if i % 2 == 0 and a[i] % 2 == 1:
        ans += 1
print(ans)
a = int(input())
b = list(map(int, input().split()))
count = 0

for i in range(a):
  if (i + 1) % 2 != 0:
    if b[i] % 2 != 0:
      count += 1
      
print(count)
n = int(input())
s = list(map(int,input().split()))
a = 0
for i in range(n):
  if i%2 == 0 and s[i]%2 ==1:
    a+=1
print(a)
for i in range(1):
   n=int(input())
   l=list(map(int,input().split()))
   c=0
   for i in range(n):
       if((i+1)%2!=0 and l[i]%2!=0):
           c=c+1
   print(c)
def main():
    N = int(input())
    a = list(map(int,input().split()))

    res = 0
    for i in range(N):
        if (i+1) % 2 == 1 and a[i] % 2 == 1:
            res += 1
    print(res)

if __name__ == "__main__":
    main()
n = int(input())
arr = list(map(int, input().split()))
acc = 0
for i in range(n):
  if i % 2 == 0 and arr[i] % 2 == 1:
    acc += 1
print(acc)
N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N):
    if i%2==0 and A[i]%2!=0:
        ans+=1
print(ans)
n=int(input())
L=[int(i) for i in input().split()]
count=0
for i in range(1,n+1,2):
  if(L[i-1]%2!=0):
    count+=1
print(count)
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
    if i % 2 == 1:
        continue
    elif a[i] % 2 != 0:
        count += 1

print(count)
n=int(input())
s=list(map(int,input().split()))
count=0


for i in range(0,len(s)):
    index_1=i+1
    if(int(s[i])%2 != 0):
        if(int((index_1))% 2 != 0 ):
            count+=1
        else:
            count+=0
    else:
        count+=0

print(count)
input()
print(sum([int(i)%2 for i in input().split()[::2]]))
import sys

import math
import itertools
import random
n=int(input())
a=list(map(int, input().split()))
cnt=0
for i in range(n):
    if(i%2==0 and a[i]%2==1):
        cnt+=1
print(cnt)
N = int(input())
A = list(map(int,input().split()))
count = 0

if N % 2 ==0:
    for i in range((N+2)//2 - 1):
        if A[2*i ] % 2 == 1:
            count += 1
else:
    for i in range((N+2)//2):
        if A[2*i ] % 2 == 1:
            count += 1

print(count)
n = int(input())

a = [int(x) for x in input().split()]

count = 0

for i in range(n):
    if i%2 == 0 and a[i]%2 == 1:
        count += 1

print(count)
a=input()
b=map(int,input().split())
c=list(b)
i=0
j=1

for k in c:
  if j%2==1 and int(k)%2==1:
    i +=1
  j +=1
print(i)
N = int(input())
a = list(map(int, input().split()))

cnt = 0
for i in range(N):

    if a[i] % 2 == 1 and (i+1)%2 == 1:
        cnt += 1

print(cnt)
N=int(input())
A=list(map(int,input().split()))
count=0
for i in range(0,N,2):
    if i%2==0 and A[i]%2==1:
        count+=1
print(count)
def main():
    n = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for a in A[::2]:
        if a % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(0,n,2):
  if a[i]%2==1:
    ans+=1
print(ans)
N = int(input())
A = list(map(int, input().split()))

count = 0
for i in range(1, N+1, 2):
    if A[i-1]%2 == 1:
        count += 1
print(count)
n = int(input())
arr = list(map(int,input().split()))
def odd(n) : return (n%2==1)
lst = list(filter(odd,arr[0:n:2]))
print(len(lst))