Problem:


Score : 200 points

Problem Statement

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.

Constraints

All values in input are integers.

1 \leq N, a_i \leq 100

Input

Input is given from Standard Input in the following format:

N
a_1 a_2 \cdots a_N

Output

Print the number of squares that satisfy both of the conditions.

Sample Input 1

5
1 3 4 5 7

Sample Output 1

2

Two squares, Square 1 and 5, satisfy both of the conditions.

For Square 2 and 4, the assigned numbers are not odd.

For Square 3, the written integer is not odd.

Sample Input 2

15
13 76 46 15 50 98 93 77 31 43 84 90 6 24 14

Sample Output 2

3



Sample input:
5
1 3 4 5 7


Sample output:
2

Submission status: Accepted

Solution code:
n = int(input())
li_a = list(map(int, input().split()))
answer = 0
for idx, v in enumerate(li_a, start=1):
    if idx %2 != 0 and v %2 != 0:
        answer += 1
print(answer)

Submission status: Accepted

Solution code:
from collections import deque
import math

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

n = NextInt()
da = NextIntList()
ans = 0
for i in range(n):
    if i%2 == 0 and da[i]%2 == 1:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(N):
    if i%2==1:
        continue
    if a[i]%2==1:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
input()
li = list(map(int, input().split()))
result = 0
for i in range(len(li)):
    if (i + 1) % 2 == 1:
        if li[i] % 2 == 1:
            result += 1
print(result)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in input().split()]
count=0
for i in range(0,n,2):
    if a[i]%2==1:
        count+=1
print(count)

Submission status: Accepted

Solution code:
N = int(input())

odd_cnt = 0
ai = []
ai = input().split(" ")

for i in range(0,N,2):
    if (int(ai[i])%2) == 1:
        odd_cnt +=1

print(odd_cnt)

Submission status: Accepted

Solution code:
t= int(input())
lista=[int (x) for x in input().split()]
cont=0
for x in range(len(lista)):
    if x % 2==0:
        if lista[x] % 2 != 0:
            cont+=1
print(cont)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
a = [int(i) for i in input().split()]
idx = 1
for i in a:
	if idx == 1 and i % 2 == 1:
		ans += 1
	idx ^= 1
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))

count=0

for i,a in enumerate(A):
    n=i+1
    if n%2==1 and a%2==1:
        count+=1

print(count)

Submission status: Accepted

Solution code:
# Problem B - An Odd Problem

# input
N = int(input())
a_nums = list(map(int, input().split()))

# initialization
count = 0

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

# output
print(count)

Submission status: Accepted

Solution code:
n = int(input())
lst = [int(x) for x in input().split()]

count = 0
for i in range(0, n, 2):
  if lst[i] % 2 == 1:
    count += 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())

numbers = list(map(int, input().rstrip(" ").split(" ")))

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

print(answer)

Submission status: Accepted

Solution code:
n= int(input())
l=list(map(int,input().split()))
count = 0
for i in range(0,n,2):
    if l[i]&1:
        count += 1
print(count)

Submission status: Accepted

Solution code:


def main():
    
    input_lines_n = input()
    n = int(input_lines_n)
    
    input_lines_a = input()
    arrA = input_lines_a.split(" ")
    
    cnt = 0
    for i in range(0, len(arrA)):
        if i % 2 == 0:
            if int(arrA[i]) % 2 != 0:
#                print(arrA[i])
                cnt = cnt + 1
    
    print(cnt)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
an = x = [int(i) for i in input().split()]

count = 0
for i in range(len(an)):
    if ((i + 1) % 2 == 0):
        continue
    if (an[i] % 2 != 0):
        count = count + 1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
A = list(map(int, input().split()))
for a in A[::2]:
    if a%2 != 0:
        ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    
    a = list(map(int,input().split()))
    a = [0] + a
    
    count = 0
    for i in range(1,n+1):
        if i%2==1 and a[i]%2==1:
            count+=1
    print(count)
    
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
A = list(map(int, input().split()))
for a in A[::2]: 
  if a%2 != 0:
  	ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0

for num in range(1, n+1, 2):
    if a[num-1] % 2 != 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

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

print(res)

Submission status: Accepted

Solution code:
n=int(input())
arr=map(int,input().split())
i=1
cnt=0
for x in arr :
	if i%2!=0 and x%2!=0 : 
		cnt+=1 
	i+=1
print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# coding: utf-8

n = int(input())
a_array = list(map(int, input().split()))

count = 0
for i, a in enumerate(a_array):
    if i % 2 == 0 and a % 2 != 0:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for j,i in enumerate(input().split(),1):
    if int(i)%2 and j%2:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
input()
A = [a for i, a in enumerate(input().split()) if i % 2 == 0 and int(a) % 2 == 1]

print(len(A))

Submission status: Accepted

Solution code:
n = int(input())
nums = [int(x) for x in input().split()]
nums_v2 = []
nums_v3 = []

for i in range(len(nums)):
      if (i+1)%2 == 1:
            nums_v2.append(nums[i])

for i in range(len(nums_v2)):
      if nums_v2[i]%2 == 1:
            nums_v3.append(nums_v2[i])

print(len(nums_v3))

Submission status: Accepted

Solution code:
N = int(input())
num = list(map(int,input().split()))
ans = 0

for j,k in enumerate(num):
    if j % 2 ==0:
        if k % 2 !=0:
            ans +=1
        else:
            pass
    else:
        pass
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys
N = int(sys.stdin.readline())
a_list = list(map(int, sys.stdin.readline().split()))

result = 0
for index in range(N):
    if (index + 1) % 2 == 1:
        if a_list[index] % 2 == 1:
            result += 1
        
print(result)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().strip().split()))[:n]
counter=0
for i in range (0,n,2):
    if(a[i]%2==1):
        counter+=1

print(counter)

Submission status: Accepted

Solution code:
it = lambda: list(map(int, input().strip().split()))


def solve():
    N = int(input())
    A = it()
    cnt = 0
    for i in range(N):
        if i % 2 == 0 and A[i] % 2:
            cnt += 1
    print(cnt)

solve()

Submission status: Accepted

Solution code:
from sys import stdin,stdout                           #
import math                                            #
import heapq                                           #
                                                       #
t = 1                                                  #
def aint():                                            #
	return int(input().strip())                        #
def lint():                                            #
	return list(map(int,input().split()))              #
def fint():                                            #
	return list(map(int,stdin.readline().split()))     #
                                                       #	
########################################################

def main():
	n=aint()
	l=lint()
	ans=0
	for i in range(0,n,2):
		if l[i]%2:
			ans+=1
	print(ans)
	return

#t=int(input())

########################################################
for i in range(t):                                     #
	#print("Case #"+str(i+1)+":",end=" ")		       #
	main()                                             #

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
C = 0

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

print(C)

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
ans=0
for i,a in enumerate(A):
    if i%2==0 and a%2==1:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
input()
print(sum([int(x) % 2 for x in input().split()[::2]]))

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))

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

print(cnt)

Submission status: Accepted

Solution code:
n= int(input())
li=list(map(int,input().split()))
a=int(0)
for i in range(0,n,2):
    if li[i]%2==1:
        a+=1
    else:
        a+=0
print(a)

Submission status: Accepted

Solution code:
N = int(input())
arr = list(map(int, input().split()))
count = sum([ 1 for x in arr[::2] if x % 2 == 1])
print(count)

Submission status: Accepted

Solution code:
import sys,math,collections
from collections import defaultdict

#from itertools import permutations,combinations
	
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 
def get_array():
	l=list(map(int, input().split()))
	return l
def get_2_ints():	
	a,b=map(int, input().split())
	return a,b
def get_3_ints():	
	a,b,c=map(int, input().split())
	return a,b,c	
def sod(n):
	n,c=str(n),0
	for i in n:	
		c+=int(i)
	return c	

def getFloor(A, x):

	(left, right) = (0, len(A) - 1)

	floor = -1
	while left <= right:
		mid = (left + right) // 2
		if A[mid] == x:
			return A[mid]
		elif x < A[mid]:
			right = mid - 1
		else:
			floor = A[mid]
			left = mid + 1
			
	return floor
#file()	
def main():
	n=int(input())
	l=get_array()
	c=0
	for i in range(0,n,2):
		if(l[i]&1):
			c+=1
	print(c)		



                       

















				

			







            
			
































		








if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

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)

Submission status: Accepted

Solution code:
length = int(input())
numbers = [int(i) for i in input().split(" ")]

cnt = 0

for i in range(length):
  if (i + 1) % 2 != 0 and numbers[i] % 2 != 0:
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n=int(input())
arr=list(map(int,input().split()))
ct=0
for _ in range(n):
  if (_+1)%2==1 and arr[_]%2==1:
    ct += 1
print(ct)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
#DEBUG=True
DEBUG=False
if DEBUG:
    f=open("202007_2nd/B_input.txt")
else:
    f=sys.stdin
N=int(f.readline().strip())
A=list(map(int,f.readline().split()))
ans=0
for _ in range(N):
    ans=ans+1 if (_+1)%2 and (A[_]%2) else ans
print(ans)
f.close()

Submission status: Accepted

Solution code:
numb=input()
inputs = list(map(int,input().split()))
count=0
for i in range(0,len(inputs)):
    if ((i+1)%2!=0) and ((inputs[i]%2)!=0):
        count+=1
    
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

for i in range(len(a)):
    if i % 2:
        a[i] = 0
    else:
        a[i] = a[i] % 2
print(sum(a))

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
count = 0

for i, number in enumerate(a, 1):
  if i % 2 != 0 and number % 2 != 0:
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')

#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()
arr=limii()
ans=0
for i in range(n):
    if i%2==0 and arr[i]%2==1:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())
    a = list(map(int, readline().split()))

    ans = 0
    for i, x in enumerate(a, 1):
        if i % 2 == 1 and x % 2 == 1:
            ans += 1

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = input()
data = list(map(int, input().split()))
t = 0
num = 0
for i in data:
  if t % 2 == 0 and i % 2 == 1:
    num += 1
  t += 1
print(num)

Submission status: Accepted

Solution code:
N = int(input())
li = []
for i in input().split():
    li.append(int(i))

a = 1
count = 0
for i in li:
    if a % 2 == 1 and i % 2 == 1:
        count += 1
    a += 1
print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=0
for i,x in enumerate(a):
    i+=1
    if (i*x)%2==0:
        continue
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    a = LI()

    r = 0
    for c in a[::2]:
        r += c % 2

    return r


print(main())

Submission status: Accepted

Solution code:
N = int(input())
a_lst = list(map(int, input().split()))

print(sum((i + 1) % 2 == 1 and a % 2 == 1 for i, a in enumerate(a_lst)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ai = list(map(int,input().split()))
counter = 0
for a in ai[::2]:
  if a%2==1:
    counter += 1
print(counter)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline

N = int(readline())
ans = 0
for a in list(map(int,readline().split()))[::2]:
  ans += (a & 1)
  
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
print(sum(ai % 2 == 1 for ai in a[::2]))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
print(sum(a[i] % 2 == 1 for i in range(0, n, 2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
ans = 0
for k,v in enumerate(a):
    if (k+1)%2==1 and v%2==1:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
cnt = 0
for ind, i in enumerate(A):
    cnt += 1 if ((ind+1) * i)%2==1 else 0
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
a=list(map(int,input().split()))
count=0
for i in range(1,N+1):
  if i%2==1:
    if a[i-1]%2==1:
      count +=1
print(count)

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())
cnt = 0
for i in range(0, n, 2):
  if a[i] % 2 == 1 :
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
a = [int(x) for x in input().split()]

count = 0

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

print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i, a in enumerate(A, start=1):
    if i % 2 == 1 and a % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))


answer = 0
for i, e in enumerate(a):
    i += 1
    if i % 2 != 0 and e % 2 != 0:
        answer += 1 
print(answer)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
l = [int(x) for x in input().split()]

cnt = 0
for i in range(n):
    if(i%2==1):
        continue
    if(l[i]%2==1):
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
print(len([i for i, j in enumerate(input().split()) if int(j)%2 == 1 and i%2 == 0]))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
how_many = int(input())
results = []
index = 0
numbers = {index+1:int(item) for index,item in zip(range(how_many),input().split())}
for key_value in numbers.items():
  if key_value[0] % 2 == 1 and key_value[1] % 2 == 1:
    results.append(True)
print(len(results))

Submission status: Accepted

Solution code:
n = int(input())
#n, k = list(map(int, input().split()))
# A = list(map(int, input().split()))
#a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
# q = int(input())
a = list(map(int, input().split()))
# b = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
# ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
count = 0
for i in range(n):
    if i % 2 == 0 and a[i] % 2 != 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))

print(sum((i + 1) % 2 == 1 and a[i] % 2 == 1 for i in range(N)))

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
A = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
for i in range(N):
    if (i+1) % 2 == 1 and A[i] % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n=int(input())
l = [int(x) for x in input().split(' ')]
c=0
for i in range(0,len(l),2):
  if((i+1)%2!=0 and l[i]%2!=0):
    c+=1
	  
print(c)

Submission status: Accepted

Solution code:
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(count)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

answer = 0
for i, a in enumerate(A, 1):
    if i % 2 and a % 2:
        answer += 1

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
    Satwik_Tiwari ;) .
    12th july , 2020  - Sunday
"""

#===============================================================================================
#importing some useful libraries.
from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
#If the element is already present in the list,
# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect
#If the element is already present in the list,
# the right most position where element has to be inserted is returned

#==============================================================================================

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
#some shortcuts

mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
# def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) : # Check Prime Number or not
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

#===============================================================================================
# code here ;))


def solve():
    n = int(inp())
    a = lis()
    cnt = 0
    for i in range(0,n,2):
        if(a[i] %2==1):
            cnt+=1
    print(cnt)



testcase(1)
# testcase(int(inp()))

Submission status: Accepted

Solution code:
N=int(input())

a=[int(x) for x in input().split()]
count=0
for i in range(len(a)):
    if (i+1)%2==1 and a[i]%2==1:
        count=count+1

print(count)

Submission status: Accepted

Solution code:
def solve(n, a):
    ans = 0
    for i in range(n):
        if (i % 2 == 0) and (a[i] % 2 == 1):
            ans += 1
    return ans

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

print(len(list(filter(lambda x: x % 2 == 1, a[::2]))))

Submission status: Accepted

Solution code:
n =int(input())
a =list(map(int,input().split()))

#print(a)

cnt = 0

for i in range(n):
  #print(i)
  if (i+1)%2 ==1:
    if a[i]%2 ==1:
      cnt +=1
        
print(cnt)