import java.util.Scanner;
import java.util.ArrayList;

class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      
      	int N = sc.nextInt();
      	int M = sc.nextInt();
        int C = sc.nextInt();
      	
      	// 要素M個のBを入力する
        ArrayList<Integer> B = new ArrayList<Integer>();
      	for (int i=0; i<M; i++) {
         	B.add(sc.nextInt()); 
        }
      
      	
      	int total = 0;
      	int count = 0;
      	int A = 0;
      	for (int i=0; i<N; i++) {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        }
      
      	System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      
      	int N = sc.nextInt();
      	int M = sc.nextInt();
        int C = sc.nextInt();
      	
      	// 要素M個のBを入力する
        ArrayList<Integer> B = new ArrayList<Integer>();
      	for (int i=0; i<M; i++) {
         	B.add(sc.nextInt()); 
        }
      
      	
      	int total = 0;
      	int count = 0;
      	int A = 0;
      	for (int i=0; i<N; i++) {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        }
      
      	System.out.println(count);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      
      	int N = sc.nextInt();
      	int M = sc.nextInt();
        int C = sc.nextInt();
      	
      	// 要素M個のBを入力する
        ArrayList<Integer> B = new ArrayList<Integer>();
      	for (int i=0; i<M; i++) {
         	B.add(sc.nextInt()); 
        }
      
      	
      	int total = 0;
      	int count = 0;
      	int A = 0;
      	for (int i=0; i<N; i++) {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        }
      
      	System.out.println(count);
    } main {
    	Scanner sc = new Scanner(System.in);
      
      	int N = sc.nextInt();
      	int M = sc.nextInt();
        int C = sc.nextInt();
      	
      	// 要素M個のBを入力する
        ArrayList<Integer> B = new ArrayList<Integer>();
      	for (int i=0; i<M; i++) {
         	B.add(sc.nextInt()); 
        }
      
      	
      	int total = 0;
      	int count = 0;
      	int A = 0;
      	for (int i=0; i<N; i++) {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        }
      
      	System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc ArrayList<Integer> B = new ArrayList<Integer>(); B new ArrayList<Integer>() for (int i=0; i<M; i++) {
         	B.add(sc.nextInt()); 
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
         	B.add(sc.nextInt()); 
        } {
         	B.add(sc.nextInt()); 
        } B.add(sc.nextInt()) B.add B sc.nextInt() sc.nextInt sc int total = 0; total 0 int count = 0; count 0 int A = 0; A 0 for (int i=0; i<N; i++) {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        } {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        } total = 0 total 0 for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            } int j=0; int j=0; j 0 j<M j M j++ j++ j {
            	A = sc.nextInt();
              	total += A * B.get(j);
            } {
            	A = sc.nextInt();
              	total += A * B.get(j);
            } A = sc.nextInt() A sc.nextInt() sc.nextInt sc total += A * B.get(j) total A * B.get(j) A B.get(j) B.get B j total += C total C if (total > 0) {
            	count++;
            } total > 0 total 0 {
            	count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;
import java.util.ArrayList;

class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      
      	int N = sc.nextInt();
      	int M = sc.nextInt();
        int C = sc.nextInt();
      	
      	// 要素M個のBを入力する
        ArrayList<Integer> B = new ArrayList<Integer>();
      	for (int i=0; i<M; i++) {
         	B.add(sc.nextInt()); 
        }
      
      	
      	int total = 0;
      	int count = 0;
      	int A = 0;
      	for (int i=0; i<N; i++) {
          	total = 0;
        	for (int j=0; j<M; j++) {
            	A = sc.nextInt();
              	total += A * B.get(j);
            }
          	total += C;
          	if (total > 0) {
            	count++;
            }
        }
      
      	System.out.println(count);
    }
}