object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val N, M, C = sc.nextInt()
    val Bs = Array.fill(M)(sc.nextInt())
    val As = Array.fill(N, M)(sc.nextInt())
    println((for {
      i <- 0 until N
    } yield {
      val as = As(i)
      if (
        as.zip(Bs).map(x => x._1 * x._2).sum + C > 0
      ) 1 else 0
    }).sum)
  }
}
