import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    }
 
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    }
 
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    } main {
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int counter = 0; counter 0 int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int[] B = new int[M]; B new int[M] M for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
        	B[i] = scan.nextInt();
        } {
        	B[i] = scan.nextInt();
        } B[i] = scan.nextInt() B[i] B i scan.nextInt() scan.nextInt scan for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        } int k = 0; int k = 0; k 0 k < N k N k++ k++ k {
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        } {
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        } int[] A = new int[M]; A new int[M] M for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
        		A[i] = scan.nextInt();
        	} {
        		A[i] = scan.nextInt();
        	} A[i] = scan.nextInt() A[i] A i scan.nextInt() scan.nextInt scan int sahen = 0; sahen 0 for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
        		sahen = sahen + A[j] * B[j];
        	} {
        		sahen = sahen + A[j] * B[j];
        	} sahen = sahen + A[j] * B[j] sahen sahen + A[j] * B[j] sahen A[j] * B[j] A[j] A j B[j] B j if(sahen + C > 0){
        		counter++;
        	} sahen + C > 0 sahen + C sahen C 0 {
        		counter++;
        	} counter++ counter System.out.print(counter) System.out.print System.out System System.out counter String[] args args public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    }
 
} public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    }
 
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int counter = 0;
      	int N = scan.nextInt();
      	int M = scan.nextInt();
      	int C = scan.nextInt();
      	int[] B = new int[M];
      	for(int i = 0; i < M; i++){
        	B[i] = scan.nextInt();
        }
      	for(int k = 0; k < N; k++){
      		int[] A = new int[M];
      		for(int i = 0; i < M; i++){
        		A[i] = scan.nextInt();
        	}
      		int sahen = 0;
      		for(int j = 0; j < M; j++){
        		sahen = sahen + A[j] * B[j];
        	}
      		if(sahen + C > 0){
        		counter++;
        	}
        }
      	System.out.print(counter);
      	
    }
 
}