'use strict'

function Main(input){
	let temp = input.trim().split("\n");
	let NMC = temp[0].split(" ").map( (v)=>(parseInt(v)) );
	let B = temp[1].split(" ").map( (v)=>(parseInt(v)) );
	let A = new Array(NMC[0]);
	for(let i=0;i<NMC[0];i++){
		A[i] = temp[i+2].split(" ").map( (v)=>(parseInt(v)) );
	}

	let count=0;

	for(let i=0;i<NMC[0];i++){
		let sum = NMC[2];
		for(let j=0;j<NMC[1];j++){
			sum += A[i][j] * B[j];
		}

		if(sum>0) count++;
	}
	console.log(count);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));