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

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

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in 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 = [int(x) for x in 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:
# -*- coding: utf-8 -*-

def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    # 標準入力を取得
    N = int(input())
    a = list(map(int, input().split()))

    return N, a


def main(N: int, a: list) -> None:
    """
    メイン処理.

    Args:\n
        N (int): マスの数
        a (list): 各マスに書かれた整数
    """
    # 求解処理
    ans = 0
    for i in range(0, N, 2):
        ans += (a[i] % 2 == 1)

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N, a = get_input()

    # メイン処理
    main(N, a)

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


def main():
    import sys
    input = sys.stdin.readline

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

    for index, ai in enumerate(a, 1):
        if index % 2 == 1 and ai % 2 == 1:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding:utf-8
n = int(input())
a = list(map(int, input().split()))
res = a[0::2]
# print(res)
ans = 0

for item in res:
    if item % 2 == 1:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
n=len(A)
k=0
ans=0
while 2*k+1 <=n:
  m=k*2
  if A[m] % 2 ==1:
    ans+=1
  k+=1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


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

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

c=0

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

    ans = 0

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))


N = int(input())
a = LI()


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#2
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, = map(int, input().split())
print(sum(i%2 for i in a[::2]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

cnt = 0
for i in range(len(a)):
    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()))

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    cnt = 0
    for i in range(N):
        if i % 2 == 0 and A[i] % 2 == 1:
            cnt += 1
    print(cnt)
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,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:
n = int(input())
a = list(map(int,input().split()))
number = len(a)
count = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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()))
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()))
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())
i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる

s = 0

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
import copy
n = int(input())
#l, r, d = map(int, sys.stdin.readline().split())
#s = input()
a = list(map(int, sys.stdin.readline().split()))

a.insert(0, 0)
ans = 0
for i in range(1, n+1):
    if i % 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()))

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

print(s)

Submission status: Accepted

Solution code:
masu = int(input())
numberlist = list(map(int,input().split()))
counter = 0

for i in range(masu):
    if (i + 1) % 2 != 0 and numberlist[i] % 2 != 0:
        counter += 1
print(counter)

Submission status: Accepted

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

ans = []

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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()))
c = 0
for i in range(0,n,2):
    if (a[i]+2) % 2 == 1:
        c = c+1
print(c)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

N = int(input())
A = map(int, input().split())
print(sum(((i + 1) * a) % 2 for i, a in enumerate(A)))

Submission status: Accepted

Solution code:
n = 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:
from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
from heapq import heappush, heappop
import math

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())
rlf = lambda: map(float, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

def main():
	n = int(rl())
	ans = 0
	for i, a in enumerate(rli(), 1):
		if i % 2 == 1 and a % 2 == 1:
			ans += 1
	print(ans)
	stdout.close()

if __name__ == "__main__":
	main()

Submission status: Accepted

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

answer =0
for i,v in enumerate(a):
    if i%2==0 and int(v)%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(N):
	c += i%2==0 and a[i]%2
print(c)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print(counter)

Submission status: Accepted

Solution code:
n = input()
ans = 0
for i,j in enumerate(map(int,input().split())):
    ans += (~i&1 and j&1)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=0

for i in range(N):
    if i%2==1:
        continue

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

Submission status: Accepted

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

ans=0

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

Submission status: Accepted

Solution code:
kosuu = input()
lis = [int(i) for i in input().split()]
count=0

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

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

print(p)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline().rstrip("\n"))
a = [int(s) for s in sys.stdin.readline().rstrip("\n").split()]
i = 0
s = 0
while i < n:
    if a[i] % 2 == 1:
        s += 1
    i += 2
print(s)

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
A = np.array(list(map(int, input().split())))
A_odd = A[::2]
print(np.sum(A_odd % 2))

Submission status: Accepted

Solution code:
n = int(input())

cnt = 0
for a in input().split(' ')[::2]:
    if int(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(1,N+1,2):
    if a[i-1]%2==1:
        cnt+=1
print(cnt)

Submission status: Accepted

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

  if li[i]%2!=0 and i%2==0:
    cnt+=1
    
print(cnt)

Submission status: Accepted

Solution code:
N, *a = map(int, open(0).read().split())

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

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
N, *a = map(int, open(0).read().split())

print(sum(1 for e in a[::2] if e % 2 == 1))

Submission status: Accepted

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

assert(len(a) == n)

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

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

ans = 0

for i in range(n):
    if i%2==0 and t[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()))
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()))
ans=0
for index, value in enumerate(a):
    if (index+1) % 2 != 0:
        if value % 2 != 0:
            #print(value)
            ans+=1
print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
N,*a = map(int,open(0).read().split())
cnt = 0
for i in a[::2]:
    if 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, j in enumerate(a):
    if i % 2 == 0 and j % 2 == 1: ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(sum([i&1 and a&1 for i,a in enumerate(A,1)]))

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