import java.util.*;

public class Main{
	static public void  main(String[] args){
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	}
} import java.util.*; util.* java public class Main{
	static public void  main(String[] args){
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	}
} Main static public void  main(String[] args){
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	} main {
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int[] b = new int[M]; b new int[M] M int[][] a = new int[N][M]; a new int[N][M] N M for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			b[i] = scan.nextInt();
		} {
			b[i] = scan.nextInt();
		} b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan int ret = 0; ret 0 for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		} {
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		} int sum = C; sum C for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				sum += b[j] * scan.nextInt();
			} {
				sum += b[j] * scan.nextInt();
			} sum += b[j] * scan.nextInt() sum b[j] * scan.nextInt() b[j] b j scan.nextInt() scan.nextInt scan if(sum > 0) ret++; sum > 0 sum 0 ret++ ret System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main{
	static public void  main(String[] args){
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	}
} public class Main{
	static public void  main(String[] args){
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	}
} Main
import java.util.*;

public class Main{
	static public void  main(String[] args){
		Scanner scan = new Scanner(System.in);

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

		int[] b = new int[M];
		int[][] a = new int[N][M];

		for(int i = 0; i < M;i++){
			b[i] = scan.nextInt();
		}
		int ret = 0;
		for(int i = 0; i < N;i++){
			int sum = C;
			for(int j = 0; j < M;j++){
				sum += b[j] * scan.nextInt();
			}
			if(sum > 0) ret++;
		}
		System.out.println(ret);
	}
}
