import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int[] B = new int[M]; B new int[M] M for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < M i M i++ i++ i {
			B[i] = sc.nextInt();
		} {
			B[i] = sc.nextInt();
		} B[i] = sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc int[] A = new int[N*M]; A new int[N*M] N*M N M for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < N*M i N*M N M i++ i++ i {
			A[i] = sc.nextInt();
		} {
			A[i] = sc.nextInt();
		} A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int[] calc = new int[M]; calc new int[M] M int tmp = 0; tmp 0 int ans = 0; ans 0 int p = 0; p 0 for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		} int i = 0 ; int i = 0 ; i 0 i < M*N i M*N M N i=i+M i=i+M i i+M i M {
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		} {
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		} for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			} int k = 0 ; int k = 0 ; k 0 k < M k M k++ k++ k {
				tmp = tmp + B[k]*A[i+k];
			} {
				tmp = tmp + B[k]*A[i+k];
			} tmp = tmp + B[k]*A[i+k] tmp tmp + B[k]*A[i+k] tmp B[k]*A[i+k] B[k] B k A[i+k] A i+k i k if(tmp+C > 0){
				ans = ans + 1;
			} tmp+C > 0 tmp+C tmp C 0 {
				ans = ans + 1;
			} ans = ans + 1 ans ans + 1 ans 1 tmp = 0 tmp 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];

		for(int i = 0 ; i < M ; i++){
			B[i] = sc.nextInt();
		}

		int[] A = new int[N*M];
		for(int i = 0 ; i < N*M ; i++){
			A[i] = sc.nextInt();
		}

		sc.close();

		int[] calc = new int[M];

		int tmp = 0;
		int ans = 0;
		int p = 0;
		for(int i = 0 ; i < M*N ; i=i+M){
			for(int k = 0 ; k < M ; k++){
				tmp = tmp + B[k]*A[i+k];
			}
			if(tmp+C > 0){
				ans = ans + 1;
			}
			tmp = 0;
		}
		System.out.println(ans);
	}
}