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

print(count)

Submission status: Accepted

Solution code:
# B - An Odd Problem
def main():
    _, *A = map(int, open(0).read().split())
    print(sum(i % 2 for i in A[::2]))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

cnt = 0

for i in range(N):
    num = i + 1
    
    if (num % 2 == 1 and nums[i] % 2 == 1):
        cnt += 1
        

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 以下の 2 つの条件の両方を満たすマスはいくつありますか？
# マスの番号は奇数
# マスに書かれた整数は奇数
n = int(input())
a = list(map(int, input().split()))
# 2 つの条件の両方を満たすマス
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+1) % 2 == 1 and a[i] % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

cont = 0
for i in range(n):
    if (i+1)%2 != 0:
        if vec[i]%2 != 0:
            cont += 1;
        
print(cont)

Submission status: Accepted

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

Submission status: Accepted

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

# B - An Odd Problem
N = int(input())
a = list(map(int, input().split()))
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline

n = int(readline())
#print(n)
a_list = list([int(x) for x in readline().rstrip().split()])
#print(a_list)
count = 0
for i in a_list[::2]:
    #print(i)
    if i % 2 != 0:
        count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys
input=sys.stdin.readline

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

Submission status: Accepted

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

for a in a_list[::2]:
  if a & 1:
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    ans = 0
    for i in range(0, n, 2):
        ans += a[i] % 2 == 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

masu = [int(i) for i in input().split(' ')]

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

Submission status: Accepted

Solution code:
print(sum(map(lambda x:int(x)%2,open(0).read().split()[1::2])))

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:
_,*A = map(int,open(0).read().split());print(sum([i%2for i in A[::2]]))

Submission status: Accepted

Solution code:
N,*A=map(int,open(0).read().split());print(len([i for i in A[::2]if i%2]))

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
    if i % 2 == 0 and A[i] % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for n in range(N):
    if (n+1)%2 == 1 :
        if A[n]%2 == 1 :
            c = c + 1

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(b)

Submission status: Accepted

Solution code:
print(sum(int(i)%2for i in[*open(0)][1].split()[::2]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(sum(i%2for i in map(int,[*open(0)][1].split()[::2])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
#from queue import *
#import random
#sys.setrecursionlimit(int(1e6))
input = sys.stdin.readline
 
############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
################################################################
############ ---- THE ACTUAL CODE STARTS BELOW ---- ############

n=inp()
ara=inara()
ans=0

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

print(ans)

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N = I()
a = LI()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    a = LI()
    count = 0
    for i in range(1,n+1):
        if i % 2 != 0 and a[i-1] % 2 != 0:
            count += 1
    print(count)
    return


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
N = int(input())
A = [int(X) for X in input().split()]
print(sum(True for T in range(1,N+1,2) if A[T-1]%2==1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, *a = map(int, open(0).read().split())
ans = 0
for i in range(0, n, 2):
    ans += a[i] % 2 == 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:
def main():
    N = int(input())
    *A, = map(int, input().split())
    ans = sum(A[i] & 1 for i in range(0, N, 2))
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

for num, idx in enumerate(cell):
    if idx == 0: continue
    if (num % 2 == 1) and (idx % 2 == 1):
        cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
i = int(input())
s = input()
l = s.split()
l_int = [int(n) for n in l]
tmp = 0
for j in range(i):
    if j % 2 ==0:
        if l_int[j] % 2 != 0:
            tmp += 1
print(tmp)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n = int(input())
    A = [0] + list(map(int, input().split()))
    print(sum((i & 1) & (a & 1) for i, a in enumerate(A)))
resolve()

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
    else:
        pass

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#print(a)
count = 0

D = []
for i in range(N):
    if i % 2 == 0:
        D.append(i)

#print(D)   

for j in D:
    if a[j] % 2 != 0:
        count += 1
        

print(count)

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:
try:
    N = int(input())
    if N>=1 and N<=100:
        a = input().split()
        counter=0
        for i in range(0,len(a)):
            if (i+1)%2 != 0 and int(a[i])%2!=0:
                counter+=1
        print(counter)
except Exception as e:
    print(e)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

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

N = I()
a = LI()

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,num in enumerate(a):
    if (i+1)%2==1 and num%2==1:
        count+=1


print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
l = list(range( 1 , N + 1))

c =[j for j in l if j % 2 != 0] 
b = [i for i in c if a[i-1] % 2 != 0] 

print(len(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = tuple([int(t)for t in 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())
a = list(map(int,input().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:
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:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from collections import deque
from decimal import *
import queue

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

def main():
	N = inputInt()
	A = inputList()

	ans = 0
	for i,val in enumerate(A):
		ii = i+1
		if ii % 2 == 1:
			if val % 2 == 1:
				ans += 1

	print(ans)

if __name__ == "__main__":
	main()

Submission status: Accepted

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

masu_list = []
for i in range(n):
    i=i+1
    if not i%2==0:
        masu_list.append(i)
    else:
        pass

answer_list=[]
for masu in masu_list:
    masu = masu-1
    answer_list.append(x[masu])

answer = [int(s) for s in answer_list]
answer_list_2=[]
for ans in answer:
    if not ans%2==0:
         answer_list_2.append(ans)
    else:
        pass
print(len(answer_list_2))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
_,*l=map(int,open(0).read().split());print(sum(-~e*i%2 for e,i in enumerate(l)))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
A=[-1]+list(map(int,input().split()))

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = int(input())
s = input()
l = s.split()
l_int = [int(n) for n in l]
tmp = 0
for j in range(i):
    if j % 2 ==0:
        # print(l_int[j])
        if l_int[j] % 2 != 0:
            # print("a")
            # print(l_int[j])
            tmp += 1
print(tmp)

Submission status: Accepted

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

count=0

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

print(count)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
a = [int(b) for b in input().split()]
for i in range(N):
  a[i] = a[i]%2
b = a[::2]
print(b.count(1))

Submission status: Accepted

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

num = 0

for i in range(N):
  if(ai[i]%2 != 0 and (i+1)%2 != 0):
    num+=1
    
print(num)

Submission status: Accepted

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

for i in range(0,len(num_list)):
   if num_list[i]%2 == 1 and (i+1)%2 == 1:
       ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

print(cns)

Submission status: Accepted

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

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

data = data[0::2]

cnt = 0

for i in data:
  if i % 2 == 1:
    cnt += 1
    
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

result = 0

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())
lst1 = list(map(int,readline().split()))
ans = 0
for i in range(0,n,2):
    if not even(lst1[i]):
        ans += 1
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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



input=input()
#input="13 76 46 15 50 98 93 77 31 43 84 90 6 24 14 0 1"
masu=[int(r) for r in input.split()]
ans=[]

for i in range(1,N+1,2):

    if masu[i-1]%2==1:
        ans.append(i)

print(len(ans))

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 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, item in enumerate(a):
    if ((i + 1) % 2 == 1) and (int(item) % 2 == 1):
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
n = int(input())

count = 0

for idx, a_i in enumerate(list(map(int, input().split()))):
    
    if (idx + 1) % 2 != 0 and a_i % 2 != 0:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
AAA = [int(i) for i in input().split()]

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)


def solve(N: int, a: "List[int]"):
    ret = 0
    for i, v in enumerate(a):
        if i % 2 == 0 and v % 2:
            ret += 1
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, a)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
N = int(s)
s = input()
a = s.split()

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
ans = list(map((lambda x: x%2 == 1), a[::2])).count(True)
print(ans)

Submission status: Accepted

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

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

def main():
	n=II()
	A=LI()

	ans=0

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









if __name__ == "__main__":
	main()

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
s = n % 2
odd = n // 2
count = 0
if s == 0:
    for i in range(odd):
        k = 2 * i + 1
        if a[k -1] % 2 == 1:
            count += 1      
elif s == 1:
    for i in range(odd + 1):
        k = 2 * i + 1
        if a[k - 1] % 2 == 1:
            count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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