import java.util.Scanner;

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

public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int M = reader.nextInt();
		int C = reader.nextInt();
		int[] B = new int[M];
		int count = 0;
		
		for (int i = 0; i < M; i++) {
			B[i] = reader.nextInt();
		}
		
		for (int i = 0; i < N; i++) {
			int result = C;
			for (int j = 0; j < M; j++) {
				 result += B[j] * reader.nextInt();
			}
			if (result > 0) {
				count++;
			}
		}
		System.out.print(count);
	}
}

