import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int numN = in.nextInt(); numN in.nextInt() in.nextInt in int numM = in.nextInt(); numM in.nextInt() in.nextInt in int numC = in.nextInt(); numC in.nextInt() in.nextInt in int[] arrayB = new int[numM]; arrayB new int[numM] numM for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		} int i = 0; int i = 0; i 0 i< numM i numM i++ i++ i {
			arrayB[i] = in.nextInt();
		} {
			arrayB[i] = in.nextInt();
		} arrayB[i] = in.nextInt() arrayB[i] arrayB i in.nextInt() in.nextInt in int result = 0; result 0 int numForcheck = 0; numForcheck 0 for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		} int k = 0; int k = 0; k 0 k < numN k numN k++ k++ k {
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		} {
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		} for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			} int j = 0; int j = 0; j 0 j< numM j numM j++ j++ j {
				numForcheck += in.nextInt() * arrayB[j];
			} {
				numForcheck += in.nextInt() * arrayB[j];
			} numForcheck += in.nextInt() * arrayB[j] numForcheck in.nextInt() * arrayB[j] in.nextInt() in.nextInt in arrayB[j] arrayB j if(numForcheck + numC > 0){
				result ++;
			} numForcheck + numC > 0 numForcheck + numC numForcheck numC 0 {
				result ++;
			} result ++ result numForcheck = 0 numForcheck 0 System.out.println(result) System.out.println System.out System System.out result in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numN = in.nextInt();
		int numM = in.nextInt();
		int numC = in.nextInt();

		int[] arrayB = new int[numM];
		
		for(int i = 0; i< numM; i++){
			arrayB[i] = in.nextInt();
		}
		

		int result = 0;
		int numForcheck = 0;
		for(int k = 0; k < numN ; k++ ){
			
			for(int j = 0; j< numM; j++){
				numForcheck += in.nextInt() * arrayB[j];
			}
			
			if(numForcheck + numC > 0){
				result ++;
			}
			numForcheck = 0;
		}
		System.out.println(result);
		
		in.close();
	}

}