program an_odd_problem
  implicit none
  integer :: n, a(100) = 0, i, x = 0
  read(*,*) n
  read(*,*) a(1:n)
  do i = 1, n
    x = x + mod(i * a(i), 2)
  end do
  write(*,'(i0)') x
end program an_odd_problem