import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    }
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    } main {
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int dateNum = scan.nextInt(); dateNum scan.nextInt() scan.nextInt scan int dateFeatureNum = scan.nextInt(); dateFeatureNum scan.nextInt() scan.nextInt scan int con = scan.nextInt(); con scan.nextInt() scan.nextInt scan int acNum = 0; acNum 0 int[] dateFeature = new int[dateFeatureNum]; dateFeature new int[dateFeatureNum] dateFeatureNum for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        } int i = 0; int i = 0; i 0 i < dateFeatureNum i dateFeatureNum i++ i++ i {
        	dateFeature[i] = scan.nextInt();
        } {
        	dateFeature[i] = scan.nextInt();
        } dateFeature[i] = scan.nextInt() dateFeature[i] dateFeature i scan.nextInt() scan.nextInt scan for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        } int i = 0; int i = 0; i 0 i < dateNum i dateNum i++ i++ i {
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        } {
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        } int sum = 0; sum 0 for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            } int j = 0; int j = 0; j 0 j < dateFeatureNum j dateFeatureNum j++ j++ j {
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            } {
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            } int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan sum += a*dateFeature[j] sum a*dateFeature[j] a dateFeature[j] dateFeature j sum += con sum con if(sum > 0){
            	acNum++;
            } sum > 0 sum 0 {
            	acNum++;
            } acNum++ acNum System.out.println(acNum) System.out.println System.out System System.out acNum String[] args args public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    }
} public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    }
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int dateNum = scan.nextInt();
      	int dateFeatureNum = scan.nextInt();
      	int con = scan.nextInt();
      	int acNum = 0;	
		int[] dateFeature = new int[dateFeatureNum];
      	//B_iを配列dateFeatureに格納する
      	for(int i = 0; i < dateFeatureNum; i++){
        	dateFeature[i] = scan.nextInt();
        }
      	for(int i = 0; i < dateNum; i++){
        	int sum = 0;
            for(int j = 0; j < dateFeatureNum; j++){
            	int a = scan.nextInt();
              	sum += a*dateFeature[j];
            }
          	sum += con;
          	
          	if(sum > 0){
            	acNum++;
            }
        }
      	System.out.println(acNum);
    }
}