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

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

Submission status: Accepted

Solution code:
def main():
    N = input_ints()

    a = input_int_list_in_line()

    print(len([True for i in range(N) if i % 2 == 0 and a[i] % 2 == 1]))




def input_ints():
    line_list = input().split()

    if len(line_list) == 1:
        return int(line_list[0])
    else:
        return map(int, line_list)


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


def input_int_tuple_list(n: int):
    return [tuple(map(int, input().split())) for _ in range(n)]


main()

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


def get_ints():
    return map(int, sys.stdin.readline().strip().split())


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


def main():
    N = int(input())
    a = list(get_ints())
    ans = 0
    for i in range(N):
        if (i + 1) % 2 == 1 and a[i] % 2 == 1:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input())

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

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

print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
n=int(input())
a=get_array()
count=0
for i in range(1,n+1):
    if i&1==1 and a[i-1]&1==1:
        count=count+1
print(count)

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:
a = int(input())
s = 0
b = input().split(" ")
i = 1
while i <= a :
    if (i % 2 == 1) and (int(b[i-1]) % 2 == 1)  :
        s = s + 1
    i = i + 1
print(s)

Submission status: Accepted

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

a = [i for i in range(1,n+1)]

for a,b in zip(a,l):
    if not a%2==0 and not b%2==0:
        count = count + 1
        
print(count)

Submission status: Accepted

Solution code:
N = int(input())
an = map(int, input().split(" "))
ans = 0
for i, ai in enumerate(an):
    #print(i+1, ai)
    if (i+1) % 2 == 1 and ai % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=input().split(' ')
c=[]
d=0
e=0
while d<a:
    if (d+1)%2==1 and int(b[d])%2==1:
        e=e+1
    d=d+1
print(e)

Submission status: Accepted

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

c = []
for i in range(1,N+1):
    if i % 2 == 1 and a[i-1] % 2 == 1:
        c.append(i)
print(len(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
L = [1]*N

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

print(L.count(1))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from functools import reduce

N = a_int()
A = ints()
ans=0
for a in A[::2]:
    ans += a & 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    cnt = 0
    n = int(input())
    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)

resolve()

Submission status: Accepted

Solution code:
inpl = lambda: list(map(int,input().split()))
N = int(input())
A = inpl()
print(sum(A[i]%2 for i in range(0,N,2)))

Submission status: Accepted

Solution code:
from sys import stdin,stdout
n=int(stdin.readline().strip())
a=list(map(int,stdin.readline().strip().split()))
stdout.write(str(len([i for i,val in enumerate(a) if (i+1)%2==1 and val%2==1]))+"\n")

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy


if __name__ == "__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)

Submission status: Accepted

Solution code:
import numpy as np


def main():
    N = int(input().rstrip())
    a = np.array([int(i) for i in input().rstrip().split(' ')])

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
print(sum((idx + 1 & 1) and (num & 1) for idx, num in enumerate(a)))

Submission status: Accepted

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

ans = 0
count = 0
for i in a:
    count += 1
    if i % 2 == 1 and count % 2 == 1:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
line = input().split(' ')

count = 0
for i in range(1,N+1):
    if i%2 ==1 & int(line[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 != 0:
        c +=1
print(c)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
a = list(map(int, input().split()))

a = a[0::2]
a = np.array(a)


print(np.count_nonzero(a%2 != 0))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = A[::2]
ans = 0
for i in B:
    if 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(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 = list(map(int, input().split())) 

#print(N)
#print(a)

count = 0

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

print(count)

Submission status: Accepted

Solution code:
for aa in range(2):
    a = list(map(int, input().split()))


ks = a[0::2]
    
c = 0
for b in ks:
    if b % 2 == 1:
        c += 1

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
in_1 = input()
in_2 = input()

N = int(in_1)
a = in_2.split()

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
total_number = int(input())
input_list = input().split(" ")
list_count = 0
answer_count = 0
for i in input_list:
	list_count += 1
	if list_count % 2 == 1:
		if int(i) % 2 == 1:
			answer_count += 1
print(answer_count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,=pin()
    A=lispin()

    cnt=0
    for i in range(1,N+1):
        j=i-1
        if A[j]%2 and i%2:cnt+=1
    print(cnt)
#%%submit!
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num_masu = int(input())
masu_array = [int(x) for x in input().split()]

count = 0
for idx_masu in range(num_masu):
    if (idx_masu+1) % 2 == 1\
            and masu_array[idx_masu] % 2 == 1:
        count += 1

print(count)

Submission status: Accepted

Solution code:
N =int(input())
array = list(map(int, input().split()))
result =0

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

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    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)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

index_list = list(range(1, n+1, 1))
odd_list = []
for i in index_list:
    if i % 2 != 0:
        odd_list.append(i)

answer_lists = []
for i in odd_list:
    if num_lists[i-1] % 2 != 0:
        answer_lists.append(i)
print(len(answer_lists))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = 0
for i in range((n + 1)// 2):
    if num[2*i] % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Accepted

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

ans=0

c=1
t1=0
t2=0

for i in inp:
    if c%2==1:
        t1=1
    if i%2==1:
        t2=1
    if t1==1 and t2==1:
        ans+=1
    
    t1=0
    t2=0
    c+=1

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

N = int(input())
# print(N)
ai = input().split(' ')
# print(ai)
num = 0
for i in range(N):
    if i % 2 == 0:
        if int(ai[i]) % 2 == 1:
            # print('asd' + str(i))
            # print('hoge' + str(ai[i*2]))
            num += 1

print(num)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    a1 = i % 2
    a2 = a[i] % 2
    if (a1==0 and a2==1):
        b.append(i)
print(len(b))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import math  # gcdもあるよ
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

mas_num = 1
satisfy_num = 0

for i in list:
  if (mas_num % 2) != 0:
    if  (i % 2) != 0:
      satisfy_num += 1
  mas_num += 1

print(satisfy_num)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
print(len([i for i, ai in enumerate(a) if i%2==0 and ai%2]))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    n = int(input())
    num = list(map(int,input().split()))
    # print(type(num[0]))
    cnt = 0
    for i in range(1,n+1):
        # print(i,num[i-1])
        if(num[i-1] % 2 != 0 and i % 2 != 0):
            cnt += 1
    print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
arr = list(map(int,input().split()))
def odd(n) : return (n%2==1)
lst = list(filter(odd,arr[0:n:2]))
print(len(lst))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力

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

Ans = 0

for k, v in enumerate(anums):
  if k % 2 == 0:
    if v % 2 == 1:
      Ans += 1

print(Ans)

Submission status: Accepted

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

cnt = 0
for ai in an[::2]:
    if ai % 2 != 0:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
d = input("")
N = int(d)
d = input("")
list = d.split()
num = []

i = 0
j = 0
while i < N:
    if ( i + 1 ) % 2 == 1:
        num.append (list[i])
        j = j + 1
    i = i + 1

j = 0
len = len(num)
count = 0
while j < len:
    if int(num[j]) % 2 == 1:
        count = count + 1
    j = j + 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())  # nは入力回数
num_list = list(map(int, input().split()))
count = 0

if n%2 == 0:
  for i in range(n//2):
    if (num_list[2*i]%2) == 1:
      count += 1
else:
  for i in range((n//2) + 1):
    if (num_list[2*i]%2) == 1:
      count += 1
      
print(count)

Submission status: Accepted

Solution code:
input()

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

b = 0
for i, n in enumerate(a):
  i += 1
  if i % 2 == 0 or n % 2 == 0:
    continue
  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!=0:
        ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
in_str = input()
N = int(in_str)
in_list = input().split(' ')
count = 0

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

print(count)

Submission status: Accepted

Solution code:
num_dic = {}
num_num = int(input())
odd_count = 0
input_line = input().split(" ")
for i in range(len(input_line)):
    num_dic[i+1] = int(input_line[i])
for k, v in num_dic.items():
    if int(k) % 2 == 1 and int(v) % 2 == 1:
        odd_count += 1
print(odd_count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a = L[0::2]


for x in a:
    if x%2==0:
        count=count
    else:
        count=count+1
print(count)

Submission status: Accepted

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

count = 0

for i in range(1, n+1):
    mod_n = i % 2
    if mod_n == 1:
        mod_masu = int(a[i-1]) % 2
        if mod_masu == 1:
            count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
import itertools as it
import collections as cl
import math
from functools import reduce

def li():
    return [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
a = int(input())
num = input().split()
num = [int(x) for x in num]
cnt = 0
for x in range ((a+1)//2):
  if num[0+2*x]%2 == 1:
    cnt +=1
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
a = input()
b = map(int,a.split())
c = 1
e = 0
for d in b:
	if c % 2 == 1:
		if d**2 % 2 == 1:
			e += 1
	c += 1
print(e)

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in b:
  if i%2 != 0:
    number = number + 1
  else:
    pass
print(number)

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 
        index %= MOD
        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())
a=[int(i) for i 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:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int,input().split()))
ans=0
for i 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

#インデックスを1から始める

step = 2
for i, name in enumerate(a, 1):
    if i%2 == 1:
        if name%2 ==1:
            count += 1
        else:
            pass
    else:
        pass

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
ary = list(map(int, input().split()))
odd = 0
cnt = 0
while len(ary) > odd:
    if (ary[odd] % 2) != 0:
        cnt += 1
    odd += 2
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
ary =  list(map(int, input().split()))
s = 0

for i in range(1, n+1, 2):
    if ary[i-1] % 2 == 1:
        s += 1

print(s)

Submission status: Accepted

Solution code:
s1 = input()
s2 = input()

a = int(s1)
b = s2.split()

c = (a + 1) // 2;

cnt = 0;

for i in range(c):
    if int(b[2 * i]) % 2 == 1:
        cnt = cnt + 1


print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
# スペース区切りの整数の入力
b = list(map(int, input().split()))

res = 0
for i in range(a):
    if (i+1) % 2 == 0:
        continue
    if b[i] % 2  == 1:
        res = res + 1
        
        
print("{}".format(res))