import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		} {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner scanner.nextLine() scanner.nextLine scanner int b[] = new int[m]; b new int[m] m for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				b[i] = scanner.nextInt();
			} {
				b[i] = scanner.nextInt();
			} b[i] = scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner scanner.nextLine() scanner.nextLine scanner int count = 0; count 0 for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			} {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			} int sum = 0; sum 0 for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
					int a = scanner.nextInt();
					sum += a * b[j];
				} {
					int a = scanner.nextInt();
					sum += a * b[j];
				} int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner sum += a * b[j] sum a * b[j] a b[j] b j if ((sum + c) > 0) {
					count++;
				} (sum + c) > 0 (sum + c) sum c 0 {
					count++;
				} count++ count scanner.nextLine() scanner.nextLine scanner System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	}
} public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int m = scanner.nextInt();
			int c = scanner.nextInt();
			scanner.nextLine();
			int b[] = new int[m];
			for (int i = 0; i < m; i++) {
				b[i] = scanner.nextInt();
			}
			scanner.nextLine();
			int count = 0;
			for (int i = 0; i < n; i++) {
				int sum = 0;
				for (int j = 0; j < m; j++) {
					int a = scanner.nextInt();
					sum += a * b[j];
				}
				if ((sum + c) > 0) {
					count++;
				}
				scanner.nextLine();
			}
			System.out.println(count);
		}
	}
}