object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val count = List.fill(sc.nextInt())(sc.nextInt())
    .zipWithIndex
    .count { case (a, i) => a % 2 == 1 && i % 2 == 0 }
  println(count)
}
