
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	} main {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int codeNum = scan.nextInt(); codeNum scan.nextInt() scan.nextInt scan int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int[] B = new int[num]; B new int[num] num for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < B.length i B.length B B.length i++ i++ i {
			B[i] = scan.nextInt();
		} {
			B[i] = scan.nextInt();
		} B[i] = scan.nextInt() B[i] B i scan.nextInt() scan.nextInt scan int[][] A = new int[codeNum][num]; A new int[codeNum][num] codeNum num for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < codeNum i codeNum i++ i++ i {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		} {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		} for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < num j num j++ j++ j {
				A[i][j] = scan.nextInt();
			} {
				A[i][j] = scan.nextInt();
			} A[i][j] = scan.nextInt() A[i][j] A[i] A i j scan.nextInt() scan.nextInt scan int sum = 0; sum 0 int count = 0; count 0 for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		} int i = 0; int i = 0; i 0 i < A.length i A.length A A.length i++ i++ i {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		} {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		} for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			} int j = 0; int j = 0; j 0 j < num j num j++ j++ j {
				sum += B[j] * A[i][j];
			} {
				sum += B[j] * A[i][j];
			} sum += B[j] * A[i][j] sum B[j] * A[i][j] B[j] B j A[i][j] A[i] A i j if (sum + C > 0) {
				count++;
			} sum + C > 0 sum + C sum C 0 {
				count++;
			} count++ count sum = 0 sum 0 System.out.println(count) System.out.println System.out System System.out count scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int codeNum = scan.nextInt();
		int num = scan.nextInt();
		int C = scan.nextInt();
		
		int[] B = new int[num];
		for (int i = 0; i < B.length; i++) {
			B[i] = scan.nextInt();
		}
		
		int[][] A = new int[codeNum][num];
		for (int i = 0; i < codeNum; i++) {
			for (int j = 0; j < num; j++) {
				A[i][j] = scan.nextInt();
			}
		}
		
		int sum = 0;
		int count = 0;
		for (int i = 0; i < A.length; i++) {
			for (int j = 0; j < num; j++) {
				sum += B[j] * A[i][j];
			}
			if (sum + C > 0) {
				count++;
			}
			sum = 0;
		}
		
		System.out.println(count);
		scan.close();
	}
}