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

print(cnt)

Submission status: Accepted

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

for i in a:
    if i % 2 == 1:
        ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    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(0,N,2):
  if a[i]%2 == 1:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
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:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache

#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b: a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

N = I()
A = IL()
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 k in range( n ):
    if ( k + 1 ) % 2 == 1 and a[ k ] % 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, 2):
    if i % 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()))

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

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

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

Submission status: Accepted

Solution code:
#B - An Odd Problem
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
    else:
        pass
print(ans)

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = int(input())
a_list = list(map(int, input().split()))
count = 0
for i in range(0, n, 2):
    if a_list[i] % 2 == 1:
        count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
import sys


def _i(): return int(sys.stdin.readline().strip())


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


def main():
    n = _i()
    cnt = 0
    for i, ai in enumerate(_ia()):
        if i % 2 == 1:
            continue
        cnt += (ai % 2)
    return cnt


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

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

n = int(input())
a = np.array(readline().split(), dtype=np.int64)
a = a[::2]
ans = np.count_nonzero(a%2==1)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
s=0
k=1
while k<=n:
  if l[k-1]%2==1: s+=1
  k+=2
print(s)

Submission status: Accepted

Solution code:
import sys

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

N, *A = map(int, read().split())

cnt = 0

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

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

Submission status: Accepted

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

    i += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

N = int(input())
Als = inpl()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

'''

'''
def solve(n, arr):
    count = 0
    for i, ai in enumerate(arr, start=1):
        if i % 2 == 1 and ai % 2 == 1:
            count += 1
    return count

n = int(input())
arr = list(map(int, input().split()))
print(solve(n, arr))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in 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 = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(ret)

Submission status: Accepted

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

c = [0] + c
ans = 0

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

print(ans)

Submission status: Accepted

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

out = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N=int(sys.stdin.readline().strip())
A=map(int, sys.stdin.readline().split())
ans=0
for i,a in enumerate(A):
    if i%2==1: continue
    if a%2==1: ans+=1
print ans

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = 0

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

Submission status: Accepted

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

c = range(1, a + 1)

for i in range(a):
    if c[i] % 2 == 1 and b[i] % 2 == 1:
        ans += 1
print(str(ans))

Submission status: Accepted

Solution code:
import itertools
import decimal
import math
import collections
import sys
#input = sys.stdin.readline
import copy

# S=(input())
# N=int(input())
# N,K=map(int,input().split())
# ListA=list(map(int,input().split()))
# ListA.sort()#reverse=True)

def resolve():
    
    N=int(input())
    ListA=list(map(int,input().split()))

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

    print(cnt)



resolve()

Submission status: Accepted

Solution code:
import sys
import copy
from collections import deque
import collections
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
a = na()

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
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:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

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

ans = 0

for i in range(0,(N+1)//2):
    if a[2*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(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()))
ans = 0
for num, i in enumerate(a):
    if (num + 1) % 2 == 1 and i % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

def main():
    ans = 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:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

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

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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


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


def readint():
    return int(input())


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


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


def main():
    _ = readint()
    a = list(readnums())
    ans = 0
    for i, v in enumerate(a):
        if (i + 1) % 2 and v % 2:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(c)

Submission status: Accepted

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

n = int(input())
As = map(int, input().split(" "))
out = 0

for i in range(n):
    j = i + 1
    if j %2 == 0:
        continue
    if As[i] %2 == 1:
        out += 1
print(out)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=0

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

print(ans)

Submission status: Accepted

Solution code:
import math

n = int(input())
aL = list(map(int, input().split(" ")))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    A = [int(e) for e in input().split()]

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    cnt = 0
    for idx, a in enumerate(A):
        if idx % 2 == 0 and a % 2 != 0:
            cnt += 1
    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

ans = 0
for idx,i in enumerate(a_list):
    if ((idx+1)%2==1)and(i%2==1):
        ans+=1
        
print(ans)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:

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

for i in range(1,n+1,1):

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

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())
a_list = map(int, input().split(" "))

result = 0
for idx, v in enumerate(a_list):
    if (idx+1) % 2 == 1 and v % 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(n):
  if i%2==0 and a[i]%2==1:
    c+=1
print(c)

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()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
a = LI()
ans = 0
for i, A in enumerate(a):
    if (i+1) % 2 == 1:
        if A % 2 == 1:
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
a_list = list(map(int, input().split()))

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

print(ans)

Submission status: Accepted

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


N = int(readline())
A = list(map(int, read().rstrip().split()))
A = A[::2]
B = [a for a in A if a % 2 == 1]
print(len(B))

Submission status: Accepted

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

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

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

Submission status: Accepted

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


def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A


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


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))