import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	}
} Main @SuppressWarnings("resource")
	public static void main(String[] args) {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	} main {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	} int ans = 0; ans 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = Integer.parseInt(scan.next()); N Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int M = Integer.parseInt(scan.next()); M Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int C = Integer.parseInt(scan.next()); C Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int B[] = new int[M]; B new int[M] M for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			B[i] = Integer.parseInt(scan.next());
		} {
			B[i] = Integer.parseInt(scan.next());
		} B[i] = Integer.parseInt(scan.next()) B[i] B i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int A[][] = new int[N][M]; A new int[N][M] N M for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		} {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		} for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				A[i][j] = Integer.parseInt(scan.next());
			} {
				A[i][j] = Integer.parseInt(scan.next());
			} A[i][j] = Integer.parseInt(scan.next()) A[i][j] A[i] A i j Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int temp = 0; temp 0 for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		} {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		} temp = 0 temp 0 for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				temp = temp + (A[i][j] * B[j]);
			} {
				temp = temp + (A[i][j] * B[j]);
			} temp = temp + (A[i][j] * B[j]) temp temp + (A[i][j] * B[j]) temp (A[i][j] * B[j]) A[i][j] A[i] A i j B[j] B j if((temp + C) > 0){
				ans++;
			} (temp + C) > 0 (temp + C) temp C 0 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {

		int ans = 0;

		Scanner scan = new Scanner(System.in);

		int N = Integer.parseInt(scan.next());
		int M = Integer.parseInt(scan.next());
		int C = Integer.parseInt(scan.next());

		int B[] = new int[M];

		for (int i = 0; i < M; i++) {
			B[i] = Integer.parseInt(scan.next());
		}

		int A[][] = new int[N][M];

		for (int i = 0; i < N; i++) {
			for (int j = 0; j < M; j++) {
				A[i][j] = Integer.parseInt(scan.next());
			}
		}

		int temp = 0;
		for (int i = 0; i < N; i++) {
			temp = 0;
			for (int j = 0; j < M; j++) {
				temp = temp + (A[i][j] * B[j]);
			}
			if((temp + C) > 0){
				ans++;
			}
		}



		System.out.println(ans);
	}
}