'use strict'

const Main = (input) => {
  const tmp = input.trim().split('\n')
  const N = parseInt(tmp[0].split(' ')[0])
  const M = parseInt(tmp[0].split(' ')[1])
  const C = parseInt(tmp[0].split(' ')[2])

  const Barr = tmp[1].split(' ').map(Number)

  let count = 0

  for (let i = 2; i <= N + 1; i++) {
    let Sum = 0
    const Aarr = tmp[i].split(' ').map(Number)
    for (let j = 0; j < M; j++) {
      Sum += Aarr[j] * Barr[j]
    }
    Sum += C
    if (Sum > 0) {
      count += 1
    }
  }

  let result = count

  console.log(result)
  return result
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))