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[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	}
} 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[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	}
} 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[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		
		int[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	} 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[] listB = new int[M]; listB new int[M] M int[][] listA = new int[N][M]; listA new int[N][M] N M for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < M i M i++ i++ i {
			listB[i] = sc.nextInt();
		} {
			listB[i] = sc.nextInt();
		} listB[i] = sc.nextInt() listB[i] listB i sc.nextInt() sc.nextInt sc for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		} int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				listA[i][j] = sc.nextInt();
			} {
				listA[i][j] = sc.nextInt();
			} listA[i][j] = sc.nextInt() listA[i][j] listA[i] listA i j sc.nextInt() sc.nextInt sc int res = 0; res 0 for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		} int sources = 0; int sources = 0; sources 0 sources < N sources N sources++ sources++ sources {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		} {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		} int count = 0; count 0 for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
				count+=listA[sources][i]*listB[i];
			} {
				count+=listA[sources][i]*listB[i];
			} count+=listA[sources][i]*listB[i] count listA[sources][i]*listB[i] listA[sources][i] listA[sources] listA sources i listB[i] listB i if((count + C) > 0) {
				res++;
			} (count + C) > 0 (count + C) count C 0 {
				res++;
			} res++ res System.out.println(res) System.out.println System.out System System.out res 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[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	}
} 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[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	}
} 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[] listB = new int[M];
		int[][] listA = new int[N][M];
		
		for(int i = 0 ; i < M; i++) {
			listB[i] = sc.nextInt();
		}
		
		for(int i = 0 ; i < N; i++) {
			for(int j = 0; j < M; j++) {
				listA[i][j] = sc.nextInt();
			}
		}
		
		int res = 0;
		
		for(int sources = 0; sources < N; sources++) {
			int count = 0;
			for(int i = 0; i < M; i++) {
				count+=listA[sources][i]*listB[i];
			}
			if((count + C) > 0) {
				res++;
			}
		}
		System.out.println(res);
	}
}