import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	} main {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt() N s.nextInt() s.nextInt s M = s.nextInt() M s.nextInt() s.nextInt s C = s.nextInt() C s.nextInt() s.nextInt s m = 0 m 0 n = 0; n 0 int[] B = new int [M] B new int [M] M A = new int [M]; A new int [M] M for (int i = 0; i < M; i++) B[i] = s.nextInt(); int i = 0; int i = 0; i 0 i < M i M i++ i++ i B[i] = s.nextInt(); B[i] = s.nextInt() B[i] B i s.nextInt() s.nextInt s for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		} {
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		} m = 0 m 0 for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			} int k = 0; int k = 0; k 0 k < M k M k++ k++ k {
				A[k] = s.nextInt();
				m += A[k] * B[k];
			} {
				A[k] = s.nextInt();
				m += A[k] * B[k];
			} A[k] = s.nextInt() A[k] A k s.nextInt() s.nextInt s m += A[k] * B[k] m A[k] * B[k] A[k] A k B[k] B k if (m + C > 0) n++; m + C > 0 m + C m C 0 n++ n System.out.println(n) System.out.println System.out System System.out n String[] args args public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	}
} public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt(), M = s.nextInt(), C = s.nextInt(), m = 0, n = 0;
		int[] B = new int [M], A = new int [M];
		for (int i = 0; i < M; i++) B[i] = s.nextInt();
		for (int j = 0; j < N; j++){
			m = 0;
			for (int k = 0; k < M; k++){
				A[k] = s.nextInt();
				m += A[k] * B[k];
			}
			if (m + C > 0) n++;
		}
		System.out.println(n);
	}
}
