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())
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)

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())
a_int_list = list(map(int, input().split()))

ans = 0

for i in range(0, N, 2):
    if a_int_list[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(n):
    if i % 2 == 0:
        if a[i] % 2 == 1:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

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

aa = np.array(a)
aa = aa[::2]
aa %= 2

print(sum(aa))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
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:
import sys


def main():

    N = int(sys.stdin.readline().rstrip())
    A = [int(x) for x in sys.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)


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
answer = 0
for i, ai in enumerate(a):
    if i % 2 == 0 and ai % 2 == 1:
        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 (i+1)%2!=0 and a[i]%2!=0:
        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+1)%2!=0:
        if a[i]%2!=0:
            ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
alist=list(map(int,input().split()))
ans=0
for i in range(N):
    if (i+1)%2==1 and alist[i]%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(1,n+1,2):
    if a[i-1]%2 != 0:
        cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = sum(ai % 2 == 1 for ai in a[::2])
print(ans)

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())
    As = [int(item) for item in input().split()]

    cnt = 0
    for i, item in enumerate(As):
        if (i+1) % 2 == 1 and item % 2 == 1: 
            cnt += 1

    print(cnt)

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

#from collections import defaultdict
#from heapq import heappush, heappop
#import numpy as np
import sys

sys.setrecursionlimit(10**6)
input = sys.stdin.buffer.readline
INF = 10 ** 9 + 1  # sys.maxsize # float("inf")
MOD = 10 ** 9 + 7

debug_indent = 0


def debug(*x):
    global debug_indent
    x = list(x)
    indent = 0
    if x[0].startswith("enter") or x[0][0] == ">":
        indent = 1
    if x[0].startswith("leave") or x[0][0] == "<":
        debug_indent -= 1
    x[0] = "  " * debug_indent + x[0]
    print(*x, file=sys.stderr)
    debug_indent += indent


def solve(N, XS):
    return sum([1 for x in range(0, N, 2) if XS[x] % 2])


def main():
    # parse input
    N = int(input())
    XS = list(map(int, input().split()))
    print(solve(N, XS))


# tests
T1 = """
15
13 76 46 15 50 98 93 77 31 43 84 90 6 24 14
"""


def test_T1():
    """
    >>> as_input(T1)
    >>> main()
    result
    """
# add tests above


def _test():
    import doctest
    doctest.testmod()


def as_input(s):
    "use in test, use given string as input file"
    import io
    global read, input
    f = io.StringIO(s.strip())

    def input():
        return bytes(f.readline(), "ascii")

    def read():
        return bytes(f.read(), "ascii")


USE_NUMBA = False
if (USE_NUMBA and sys.argv[-1] == 'ONLINE_JUDGE') or sys.argv[-1] == '-c':
    print("compiling")
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('solve', solve.__doc__.strip().split()[0])(solve)
    cc.compile()
    exit()
else:
    input = sys.stdin.buffer.readline
    read = sys.stdin.buffer.read

    if (USE_NUMBA and sys.argv[-1] != '-p') or sys.argv[-1] == "--numba":
        # -p: pure python mode
        # if not -p, import compiled module
        from my_module import solve  # pylint: disable=all
    elif sys.argv[-1] == "-t":
        print("testing")
        _test()
        sys.exit()
    elif sys.argv[-1] != '-p' and len(sys.argv) == 2:
        # input given as file
        input_as_file = open(sys.argv[1])
        input = input_as_file.buffer.readline
        read = input_as_file.buffer.read

    main()

Submission status: Accepted

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

ans = 0

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

print(ans)

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in 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()))
cnt = 0
for i in range(len(a)):
  if (i+1)%2 != 0 and a[i] % 2 != 0:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split(" ")]
A = [a for i, a in enumerate(A) if i % 2 == 0 and a % 2 != 0]
print(len(A))

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect
import sys
import math
from collections import deque
from heapq import heappush, heappop

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

DIV = (10**9) + 7
#DIV = 998244353

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            self.fac = fac
            self.finv = finv
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % DIV) % DIV

    return CONV()


def cumsum(As):
    s = 0
    for a in As:
        s += a
        yield s


sys.setrecursionlimit(200005)


def dijkstra(G,start=0):
    heap = []
    cost = [INF]*len(G)
    heappush(heap,(0,start))
    while len(heap)!=0:
        c,n = heappop(heap)
        if cost[n] !=INF:
            continue
        cost[n]=c
        for e in G[n]:
            ec,v = e
            if cost[v]!=INF:
                continue
            heappush(heap,(ec+c,v))
    return cost


def main():
    N =iRaw()
    As = isRaw()
    ans = [1 if i%2==0 and k%2==1 else 0 for i,k in enumerate(As)]
    print(sum(ans))

main()

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:
n = int(input())
l = list(map(int,input().split()))
ans = 0
for i in range(0, n, 2):
  if l[i] % 2 != 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
def B():
    N = int(input())
    A = [int(i) for i in input().split()]
    ans = 0
    for i in range(0, N, 2):
        if A[i]%2 == 1:
            ans += 1
    print(ans)
B()

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:

def main():
  n = int(input())
  A = tuple(map(int, input().split()))

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

  print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    a = list(map(int, input().split()))
    r = 0
    for i, v in enumerate(a):
        if i % 2 == 0 and v % 2 == 1:
            r += 1
    return r
print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np


def solve(N: int, a: "List[int]"):
    ans = 0
    for i in range(1,(N+1)):
        if (i%2==1) and (a[i-1]%2==1):
            ans += 1

    print(ans)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
LI = lambda: list(map(int,input().split()) )
MI = lambda: map(int,input().split())
SI = lambda: input()
II = lambda: int(input())
n = II()
a = LI()
count = 0
for i in range(n):
    if a[i]%2 == 1 and i%2 == 0:
        count+=1
print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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 main():
    N = II()
    A = LI()
    ans = 0
    for i in range(N):
        if i % 2 == 0 and A[i] % 2 == 1:
            ans += 1
    print(ans)


# oj t -c "pypy3 main.py"
# acc s main.py -- --guess-python-interpreter pypy
main()

Submission status: Accepted

Solution code:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[5]:


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


# In[6]:


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


# In[ ]:

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

N = int(input())
A = 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 = [0] + list(map(int, input().split()))

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
# print('input >>')
N = input()
a_s = list(map(int,(input().split())))

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

# print('-----output-----')
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
#n,k = map(int,input().split())
a = list(map(int,input().split()))
#mod = pow(10,9) + 7
sum = 0
for i in range(1,n+1):
    if i%2 == 1 and a[i-1]%2 ==1:
        sum += 1
print(sum)
'''
a = []
for i in range(n):
    a.append(list(map(int,input().split())))
print(a)
'''

Submission status: Accepted

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

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

Submission status: Accepted

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

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()))
count = 0
for i in range(n):
    if (i%2==0) and (a[i]%2==1):
        count += 1
print(count)

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()

A=many_int()

count=0
for i in range(0, len(A),2):
    if A[i]%2==1:
        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 & 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 != 0):
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
# mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file=0





def solve():


    # for _ in range(ii()):
    
        

    n=ii()
    a=li()
    ans=0
    for i in range(1,n+1):
        if i&1 and a[i-1]&1:
            ans+=1
    print(ans)







        
if __name__ =="__main__":

    if(file):

        if path.exists('input1.txt'):
            sys.stdin=open('input1.txt', 'r')
            sys.stdout=open('output1.txt','w')
        else:
            input=sys.stdin.readline
    solve()

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 != 0 and a[i]%2 != 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a_l = list(map(int,input().split()))
ans = 0
for i in range(N):
    if (i+1) % 2 == 1:
        if a_l[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())
l = list(map(int, input().split()))
counter = 0
for i in range(0, n, 2):
  if l[i] % 2 == 1:
    counter += 1
print(counter)

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 in range(n):
    if i%2==0 and a[i]%2:
        ans+=1
print(ans)

Submission status: Accepted

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

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()))
print(len([i for i in range(n) if i % 2 == 0 and a[i] % 2 == 1]))

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:
from sys import stdin, stdout

int_in = lambda: int(stdin.readline())
arr_in = lambda: [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda: stdin.readline().strip()
out = lambda o: stdout.write("{}\n".format(o))
arr_out = lambda o: out(" ".join(map(str, o)))
bool_out = lambda o: out("YES" if o else "NO")
tests = lambda: range(1, int_in() + 1)
case_out = lambda i, o: out("Case #{}: {}".format(i, o))


def solve(n, a):
    result = 0
    for i, item in enumerate(a):
        if (i + 1) % 2 == 1 and item % 2 == 1:
            result += 1
    return result


if __name__ == "__main__":
    n = int_in()
    a = arr_in()
    out(solve(n, a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (
    acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians,
    sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


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


def instr():
    s = input()
    return(list(s[:len(s)]))


def invr():
    return(map(int, input().split()))


def main():
    n = inp()
    a = inlist()
    res = 0
    for i in range(n):
        if a[i] % 2 != 0 and i % 2 == 0:
            res += 1
    print(res)


    # region fastio
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")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
def input(): return sys.stdin.readline().rstrip("\r\n")

# endregion


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    l =[int(x) for x in input().split()]
    c=0
    for i in range(0,N,2):
        if l[i]%2==1:
            c+=1
            
    print(c)
    
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(input())
A = list(map(int, input().split()))
for i in range(n):
    if (i+1)%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()))

ans = 0
for i, j in enumerate(A, 1):
    if i%2 != 0 and j%2 != 0:
        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

print(cnt)

Submission status: Accepted

Solution code:
import sys

def I(): 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 main():
    n = I()
    a = LI()
    ans = 0
    for i in range(1, n+1):
        if i%2 and a[i-1]%2:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
#import numpy as np
import bisect
import sys
#import sympy
sys.setrecursionlimit(10**6)


def bfs(s, n, node):
    # 頂点が探索済みかどうかのチェック配列
    check = [False for _ in range(n)]
    check[s] = True
    # 次見る頂点を格納するキュー
    queue = deque([s])
    visited_num = 1

    # 問題固有の配列
    #color_check=[[True for _ in range(l)] for _ in range(n)]
    color = [-1 for _ in range(n)]
    color[s] = 0

    while visited_num < n:
        # グラフが全連結ではない場合
        if len(queue) == 0:
            # 空配列を返す
            # 現状までの計算済み配列を返してもいいと思う
            return color

        now_vertex = queue.popleft()
        # インデックスがない場合は
        for next_vertex in node[now_vertex]:

            if check[next_vertex] == True:
                continue

            queue.append(next_vertex)
            check[next_vertex] = True

            # 問題固有の計算
            color[next_vertex] = color[now_vertex]+1
            visited_num += 1

    return color


mod = 10**9+7
# n=int(input())
# n,m=list(map(int,input().split()))
# a=list(map(int,input().split()))
def ceil(x, y): return (x+y-1)//y
def input_list(): return list(map(int, input().split()))


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:
n = int(input())
*arr, = map(int, input().split())

cnt = 0
for i, v in enumerate(arr):
    if (i + 1) % 2 == 1 and v % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A.insert(0,0)
ans=0

for i,v in enumerate(A):
  if i%2==1 and v%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+1)%2==1:
        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 a in range(0,len(A),2):
    if A[a]% 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

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

print(counter)

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    n = II()
    aa = MII()
    print(sum([1 for a in aa[0::2] if a%2 == 1]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def main():
    N = int(input().strip())
    A = [int(i) for i in input().strip().split()]
    ans = 0
    for idx, a in enumerate(A):
        if (idx + 1) % 2 == 1 and a % 2 == 1:
            ans += 1
    return ans


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

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 != 0:
        ans += 1

print(ans)

Submission status: Accepted

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

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

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

print(ans)