import scala.io.StdIn

object Main {

  def main(args: Array[String]): Unit = {

    val Array(n, h, w): Array[Int] = StdIn.readLine().split(' ').map(_.toInt)
    val abs: Seq[Seq[Int]] =
      (1 to n).foldLeft(Vector(): Vector[Vector[Int]])((acc, _) =>
        acc :+ StdIn.readLine().split(' ').toVector.map(_.toInt))

    println(solve(h, w, abs))

  }

  def solve(h: Int, w: Int, abs: Seq[Seq[Int]]): Int = {

    abs.foldLeft(0)((acc, ab) => {
      val d = if (ab(0) >= h && ab(1) >= w) 1 else 0
      acc + d
    })

  }
}
