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 = [int(e) for e in input().split()]

ans = 0
time = 1

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

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from scipy.sparse.csgraph import floyd_warshall
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = list(map(int, input().split()))
a = [a[i] for i in range(n) if i % 2 == 0]
a = np.array(a)
ans = np.sum(a % 2 == 1)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

for num in range(1, n+1, 2):
    if num_list[num-1] % 2 == 1:
        count += 1

print(count)

Submission status: Accepted

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


ans = 0
for item in a[::2]:
  if item %2 == 1:
    ans += 1


print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

s = 0

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

print(s)

Submission status: Accepted

Solution code:
from itertools import product
N = int(input())
a = list(map(int,input().split()))
#L, R, d=map(int,input().split())
#C = []
# for i in range(N):
#    C.append((input().replace(".","0").replace("#","1")))
# S=list(map(int,input().split()))
# B=list(map(int,input().split()))
count = 0
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()))

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:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
A = A.reshape((int(N/2), 2))[:,0] if N % 2 == 0 else np.append(A, 2, 100).reshape((int((N+1)/2), 2))[:, 0]
print((A % 2 == 1).sum())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
for i in range(len(a)):
  if (i+1)%2 ==1:
    if a[i]%2 ==1:
      count = count + 1
    else:
      pass
  else:
    continue

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

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
  else:
    continue
print(count)

Submission status: Accepted

Solution code:
# 解答
def abc173_a(lines):
    N = int(lines[0])
    values = map(int, lines[1].split(' '))
    answer = 0
    tmp = list()
    for value in values:
        tmp.append(value)
    for i in range(N):
        if i % 2 != 0:
            pass
        else:
            if tmp[i] % 2 != 0:
                answer += 1
    return [answer]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5', '1 3 4 5 7']
        lines_export = [2]
    elif pattern == 2:
        lines_input = ['15', '13 76 46 15 50 98 93 77 31 43 84 90 6 24 14']
        lines_export = [3]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = abc173_a(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        print(f'lines_input=[{lines_input}]')
        print(f'lines_export=[{lines_export}]')
        print(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            print('OK')
        else:
            print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import deque
si = sys.stdin.readline


def main():
    n = int(si())
    l = [int(e) for e in si().split()]
    cnt = 0
    for i in range(len(l)):
        if i % 2 == 0 and l[i] % 2 != 0:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=[input() for i in range(2)]
a1=int(a[0])
a2=[int(i) for i in a[1].split()]

count=0

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

print(count)

Submission status: Accepted

Solution code:
#マス i には ai が書かれています
#奇数番目に奇数が書かれている数

N = int(input())
l = input().rstrip().split(" ")
a = list(map(int, l))
#print(a)

ans = 0
for i in range(len(a)):
    if i % 2 == 1:  #奇数番目の番号は偶数なので
        continue
    else:
        if a[i] % 2 == 1:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
b = input().split()
x = 0
y = 0
for i in range(a):
    if len(b) > x:
        if int((int(b[x]) + 1) % 2) == 0:
            y = y + 1
    x = x + 2
print(y)

Submission status: Accepted

Solution code:
N = int(input())
l2 = input().split()
l1 = list(range(1,N+1))
l2 = [int(s) for s in l2]

count = 0
for i in range(N):
  if l1[i]%2==1 and l2[i]%2==1:
    count += 1
    
print(count)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

odd = []
ans = []
for i in range(n):
  if i%2 == 0:
    odd.append(a[i])

for j in range(len(odd)):
  if odd[j]%2 == 1:
    ans.append(odd[j])

print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0

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

print(counter)

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
N = int(input())
a =[0] +list(map(int, input().split()))
count =0
for i in range(1,N+1):
    if i %2 ==1:
        if a[i] %2 ==1:
            count +=1
print(count)

Submission status: Accepted

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


def oddProblem(l):
    count = 0
    for i in range(N):
        if (l[i] % 2 != 0 and (i+1) % 2 != 0):
            count += 1
    return count

print(oddProblem(l))

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
import sys
N = int(sys.stdin.readline())
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)

Submission status: Accepted

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

for i in range(n):
    i = i + 1
    if i % 2 != 0:
        if nums[i-1] % 2 != 0:
            count += 1

print(count)

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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+1)%2==1 and A[i]%2==1:
        ans += 1
    else:
        continue
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


ton = [i for i in range(1,n+1)]
ans = 0

for k in range(n):
  if ton[k]%2 == numlist[k]%2 == 1:
    ans += 1
    
print(ans)

Submission status: Accepted

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

n = int(input())
numbers = input().split(" ")
result = 0


for i in range(n):
    if i % 2 == 0 and int(numbers[i]) % 2 == 1:
        result += 1

print(result)

Submission status: Accepted

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

result = 0
for i, num in enumerate(num_lst):
  if i % 2 == 0:
    if num % 2 == 1:
      result += 1

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
import bisect
from collections import deque
from copy import copy, deepcopy


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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().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()))
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()))
k = 0

for i in range(N):
    if (i % 2 == 0):
        if (a[i] % 2 == 1):
            k += 1
    else:
        continue

print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    N = (int(input()) + 1) // 2 * 2 
    A = list(map(int,input().split()))
    ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

num = 0
for i in range(0, len(a)):
    w = i + 1
    if w % 2 != 0:
        if a[i] % 2 != 0:
            num = num + 1

print(num)

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:

n = int(input())
a = input()
b = []
counter = 0

b = a.split()

for i in range(n):
    if(i%2 == 0 and (int(b[i])%2 != 0)):
        counter += 1

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
import sys
import bisect
from functools import lru_cache
from collections import defaultdict
inf = float('inf')
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**6)
def input(): return sys.stdin.readline().rstrip()
def read():
  return int(readline())
def reads():
  return map(int, readline().split())
N=read()
a=list(reads())
count=0
for i in range(N):
  if (i+1)%2==0:
    continue
  elif a[i]%2==0:
    continue
  else:count+=1
print(count)

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:
def main():
    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)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
_,*a=map(int,open(0).read().split());print(sum(i%2for i in a[::2]))

Submission status: Accepted

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

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i, elm in enumerate(As):
    if i % 2 == 0 and elm % 2 != 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import numpy as np


def main(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(main(N, a))

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
li = list(map(int,input().split()))
coun=0
for i,h in enumerate(li):
  if ((i+1) % 2 == 1) and (h % 2 == 1):
    coun+=1
    #print(i)
print(coun)

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

count = 0

for i in range(0,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()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n=int(input())
alist=list(map(int,input().split()))
cnt=0
ans=0
for i in alist:
  cnt+=1
  if int(i%2) and int(cnt%2):
    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 ==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 A[i] %2 == 1:
        if (i+1)%2 == 1:
            ans += 1
print(ans)

Submission status: Accepted

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


res = 0
for i in a[::2]:
    if i % 2 == 1:
        res +=1

print(res)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in 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()))

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

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

print(flag)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as ma
N = int (input ())
l = input ().split ()
a = 0
b = 0
for i in range (ma.floor(N/2)+(N%2)):
  if (int(l[b]))%2 == 1:
    a += 1
  b += 2
print (a)

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split());ans=0;i=1
for x in a:
  if x%2!=0 and i%2!=0:
    ans+=1
  i+=1
print(ans)

Submission status: Accepted

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

count = 0
a = a[::2]

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

print(count)

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
nombres = [int(x) for x in input().split()]
k = 0
for indexe,nombre in enumerate(nombres):
    if ((indexe + 1)%2 == 1 and nombre%2 == 1):
        k += 1
print(k)

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

Submission status: Accepted

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


def main():

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
squares			= int(input())
squares_number	= list(map(int, input().split()))
answer			= 0

for i in squares_number[::2]:
  if (i % 2) != 0:
    answer += 1
print(answer)

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N = (int)(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

i = 0
count = 0

while 1:
    if A[i]%2==1:
        count+=1
    
    if i+2>=N:
        break
    i+=2

print(count)

Submission status: Accepted

Solution code:
N = int(input())
nums = [int(e) for e in input().split()]

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

print(count)

Submission status: Accepted

Solution code:
def main():
    no = int(input())
    maths = map(int,input().split())
    
    count = 0
    for index,math in enumerate(maths):
        if index % 2==0 and math %2==1:
            count+=1
    print(count)


if __name__ == "__main__":
    main()

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 != 0:
        if a[i - 1] % 2 !=0:
            count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import collections
from functools import lru_cache


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


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


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


def solve(n, arr):
    ans = 0

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

    return ans


n = readInt()
arr = readList()

print(solve(n, arr))

Submission status: Accepted

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

print(cnt )

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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 a[0::2]:
    if not i % 2 == 0:
        cnt = cnt +1
print(cnt)