input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
line = lines.shift().split(' ')
N = line[0] * 1
M = line[1] * 1 
C = line[2] * 1
B = lines.shift().split(' ')
cnt = 0
for (i=0;i<N;i++) {
    line = lines[i].split(' ')
    sum = 0
    for (j=0;j<M;j++) {
        sum += line[j] * B[j]
    }
    if (sum + C > 0) {
        cnt++
    }
}
console.log(cnt)
