import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n, m, c = sc.nextInt()
    val bs = List.fill(m)(sc.nextInt())
    val as = Array.ofDim[Int](n, m)

    for (i <- 0 until n) {
      for (j <- 0 until m) {
        val a = sc.nextInt()
        as(i)(j) = a
      }
    }

    println(as.count(a => {
      var tmp = 0
      for (i <- 0 until m) {
        tmp += a(i) * bs(i)
      }
      tmp + c > 0
    }))
  }
}
