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:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
MOD = (10 ** 9) + 7  # operować sobie na typie int32_t


def 関数(n, a):
    res = 0
    for i, num in enumerate(a):
        index = i + 1 
        if index % 2 and num % 2:
            res += 1
    return res

def çözmek():
    N = input()
    a = list(iimr())
    res = []
    res.append(関数(N,a))
    print(*res, sep="\n")

if __name__ == "__main__":
    çözmek()

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))
count = 0
final = 0

for masu in li:
  count += 1
  if count % 2 != 0:
    if masu % 2 != 0: 
    	final += 1
        
print(final)

Submission status: Accepted

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


N = int(input())
A = list(map(int, input().rstrip().split()))

ans = 0
for i in itertools.count(0, 2):
    if i > N - 1:
        break
    if A[i] % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys 

readline = sys.stdin.readline 

N = int(input())
A = readline().split()

counter = 0
for i in range(N):
    if (i+1) % 2 != 0:
        if int(A[i]) % 2 != 0:
            counter += 1

print(counter)

Submission status: Accepted

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

cnt = 0
for a in A[::2]:
    if a % 2 != 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
input = input().split()
number = []
total = 0

for i in range(N):
  number.append(int(input[i]))
  if i % 2 == 0:
    if number[i] % 2 == 1:
      total += 1

print(total)

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
index_count = 0
count = 0
t = 1
for i in A:
    if t % 2 !=0:
        if i % 2 != 0:
            count += 1
    t += 1
print(count)

Submission status: Accepted

Solution code:
a=[]
N = int (input())
a = list(map(int, input().split()))
count=0
i=0
while i<N:
  if (i+1)%2==1 and a[i]%2==1:
    count+=1
  i+=1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
N_list =[int(x) for x in input().split()]
c = 0
for i in N_list[::2]:
    if i % 2 != 0:
        c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
from sys import stdin,stdout
n=int(stdin.readline())
a=list(map(int,stdin.readline().split()));ans=0
for i in range(1,n+1):
    if i&1 and a[i-1]&1:ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int, input().split())) 
kisuu=b[0::2]
ans=[num for num in kisuu if num % 2 == 1]
print(len(ans))

Submission status: Accepted

Solution code:
n = int(input())
a_list = [s for s in map(int, input().split())]
num = 0
for i in range(n):
    x = a_list[i] / 2
    y = (i + 1) / 2
    if x != int(x) and y != int(y):
        num += 1
print(num)

Submission status: Accepted

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

cnt = 0
for i in range(n):
  if i % 2 == 0 and ls[i] % 2 != 0:
    cnt += 1
    
print(cnt)

Submission status: Accepted

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

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


print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

def solver(N,A):
    ans = 0

    for i,a in enumerate(A):
        #print(i,a)
        if (i+1) % 2 != 0 and a % 2 != 0:
            ans += 1

    print(ans)

def main():

    N = LI()
    A = LI()

    solver(N,A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int,input().strip().split()))
i = 0
c = 0
while i<n:
  if (i+1)%2!=0 and nums[i]%2!=0:
    c += 1
  i += 1
 
print(c)

Submission status: Accepted

Solution code:
N = int(input())
a_list = list(map(int, input().split()))
q, r = divmod(N, 2)
n = q + r
count = 0

for i in range(1,n+1):
    #print(i)
    if a_list[2*i - 2]%2 == 1:
        count += 1
    #print(2*i-1, count)
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

tmp = input().split(' ')

a = []
result = []
for i in range(N):
    a.append(int(tmp[i]))
    if ((i+1) % 2 == 1 and a[i] % 2 == 1):
        result.append(a[i])

print(len(result))

Submission status: Accepted

Solution code:
#=input()
n=int(input())
#=map(int,input().split())
#=map(str,input().split())
l=list(map(int,input().split()))
k=l[::2]
j=list(filter(lambda x: x % 2 ==1, k))
print(len(j))

Submission status: Accepted

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

Submission status: Accepted

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

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

    if a % 2 == 0:
        continue

    ans += 1

print(ans)

Submission status: Accepted

Solution code:
N=int(input()) # マスの個数、マスの番号が1-N
A=list(map(int,input().split(" "))) # マスのリスト
An=[i for i in range(1,N+1)] # マスの番号のリスト

count=0 # 条件を満たすマスの数

# 各マスについて見てゆく
for ai in range(len(A)):
    if (A[ai]%2==1) and (An[ai]%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 % 2 == 0 and a[i] % 2 == 1:
        cnt += 1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    count = 0
    
    if n%2:
        n_ = (n+1) // 2
        for i in range(n_):
            m = 2 * i + 1
            
            if a[m-1]%2==1:
                count += 1
    else:
        n_ = n // 2
        for i in range(n_):
            m = 2 * i + 1
            
            if a[m-1]%2==1:
                count += 1
        
    print(count)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, *a = map(int, open(0).read().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())
list = list(map(int, input().split()))
cnt = 0
li = []
for count, i in enumerate(list):
    if count %2 ==0:
        li.append(i)

for j in range(len(li)):
    if li[j] %2 ==1:
        cnt +=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    A=list(mi())

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




if __name__ == "__main__":
    main()

Submission status: Accepted

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

count = 0

for (i, a_i) in enumerate(a_lst):
    if (i + 1) % 2 == 1 and a_i % 2 == 1:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
# print(n)
a_list = list(map(int, input().split()))
# print(a_list)

ans = 0
for i in range(len(a_list)):
    no = i + 1
    value = a_list[i]
    
    if no % 2 == 1:
        if value % 2 == 1:
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
odd_list = a_list[0::2]
print( len([i for i in odd_list if i%2==1]) )

Submission status: Accepted

Solution code:
N = input()
numbers = list(map(int, input().split()))
lis = numbers[0::2]
print(len([i for i in lis if i % 2 == 1]))

Submission status: Accepted

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

for i in range(len(a)):
  if i%2 == 0:
    ans.append(a[i])
  else:
    continue

print(len([i for i in ans if i % 2 != 0]))

Submission status: Accepted

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

i = 0
j = 0
while i < n:
    if a[i] % 2 == 1:
        j += 1
    i = i +2

print(j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num=input()

masu=list(map(lambda x:int(x),input().split()))
masu=masu[0::2]
ans=[i for i in masu if i%2!=0]
print(len(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:
    if a[i]%2==1:
      cnt+=1
print(cnt)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
B=0
count=0
if N%2!=0:
    N=N+1
for i in range(round(N/2)):
    if A[B]%2!=0:
        count=count+1
    B=B+2
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:
        if 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(N):
    if i%2 == 0 and A[i]%2 != 0:
        cnt += 1
    else:
        continue
print(cnt)

Submission status: Accepted

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

if (N%2 == 0):
  c=N//2
else:
  c=N//2 + 1

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

print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input()) 
masu_list = list(map(int, input().split()))
result = 0

for i, masu in enumerate(masu_list):
    i = i+1
    if i % 2 == 1:
        if masu % 2 == 1:
            result = result + 1

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A = A[::2]
A_odd = [i for i in A if i % 2 == 1]

print(len(A_odd))

Submission status: Accepted

Solution code:
n=int(input())
lst=list(map(int,input().split()))
cnt=0
for i,j in enumerate(lst,1):
    if i%2==0:
        pass
    else:
        if j%2==0:
            pass
        else:
            cnt+=1
print(cnt)

Submission status: Accepted

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

print(sum(a % 2 == 1 for i, a in enumerate(A, 1) if i % 2 == 1))

Submission status: Accepted

Solution code:
N = int(input())
A_i = input().split(" ")

count=0
for i in range(1,N+1):
    if i%2!=0 and int(A_i[i-1])%2!=0:
      count=count+1


print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(e) for e 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()))

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

Submission status: Accepted

Solution code:
import math

def a():
    l,r,d = map(int,input().split())
    count = 0
    for i in range(l,r+1):
        if i % d == 0:
            count += 1
    print(count)


def b():
    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)


def c():
    print('')



def d():
    print('')


b()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in 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())
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:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


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

    print(ans)

if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
N = int(input())
Mylist = input().split()
Mylist = [int(s) for s in Mylist]
ANS = 0
for i in range(1,N+1):
  if i % 2 == 1 and Mylist[i-1] % 2 == 1:
    ANS += 1
print(ANS)

Submission status: Accepted

Solution code:
N = int(input())
#L=[list(map(int, input().split())) for i in range(int(input()))]

L=list(map(int, input().split()))
#print(L)
#L=[list(map(int, input().split())) for i in range(N)]
L_odd=L[::2]
j=0
for i in L_odd:
    #print(i)
    if i%2==1:
        j+=1
print(j)

Submission status: Accepted

Solution code:

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == "__main__":
  resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  from sys import stdin
  n = int(stdin.readline())
  l = list(map(int, stdin.readline().split()))
  c = 1
  k = 0
  for a in l:
    if c == 1:
      if a % 2 == 1:
        k += 1
      c = 0
    else:
      c = 1
  print(k)
main()

Submission status: Accepted

Solution code:
N = int(input())
arr = tuple(map(int, input().split()))
count = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [i for i in 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())
input_line = list(map(int, input().split(' ')))
ans = 0
for i in range(N):
    if(((i+1)*input_line[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(0,len(A),2):
    if A[i]%2!=0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
N = int(input())

cnt = 0
A = list(map(int, input().split()))

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for aindex, a in enumerate(alist):
    if (aindex + 1) % 2 != 0 and a % 2 != 0:
       ans += 1
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    numlist = list(map(int,input().split()))

    count = 0

    for i in range(len(numlist)):
        if (i+1) % 2 == 1:
            if numlist[i] % 2 == 1:
                count += 1
    
    print(count)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from heapq import *
from collections import *
import os
import sys
sys.setrecursionlimit(1<<30)
from io import BytesIO, IOBase
import math
import bisect
from math import inf

 
ins = lambda: [int(x) for x in input()]
inp = lambda: int(input())
inps = lambda: [int(x) for x in input().split()]
 
from fractions import Fraction as F
def main():
    
    n=inp()
    a=inps()

    cnt=0
    for i in range(n):
        if (i+1)&1 and a[i]&1:
            cnt+=1
    print(cnt)
    


  
 
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)
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
if __name__ == "__main__":
    main()
# import threading,sys
# sys.setrecursionlimit(1000000)
# threading.stack_size(1024000)
# thread=threading.Thread(target=main)
# thread.start()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def is_odd(n):
    if n % 2 == 0:
        return False
    else:
        return True

input()
a_list = [int(i) for i in input().split()]
count = 0
for n in a_list[::2]:
    if is_odd(n):
        count += 1

print(count)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#import 
#=input()
n=int(input())
#=map(int,input().split())
a=[0]
a+=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline())
num_line = stdin.readline()
nums = num_line.split(' ')
odd = True;
counter = 0
for i in nums:
    number = int(i)
    if (number%2 == 1 and odd):
        counter +=1 
    odd = not odd
    
print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = input().split()
intN = int(s1[0])
s2 = input().split()

cnt = 0
wk = 1
while wk <= intN:
    if (wk % 2 != 0) :
        if (int(s2[wk-1]) % 2 != 0) :
            #print(wk)
            #print(s2[wk-1])
            cnt += 1
    wk += 1

print(cnt)

Submission status: Accepted

Solution code:
input()
A = list(map(int, input().split()))
count = 1
Ans = 0
for i in A :
    if count%2 and i%2 :
        Ans += 1
    count += 1

print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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