import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt() N sc.nextInt() sc.nextInt sc M = sc.nextInt() M sc.nextInt() sc.nextInt sc C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int B[] = new int[M]; B new int[M] M int A[][] = new int[N][M]; A new int[N][M] N M int AB[] = new int[N]; AB new int[N] N for(int x=0; x<M; x++)B[x] = sc.nextInt(); int x=0; int x=0; x 0 x<M x M x++ x++ x B[x] = sc.nextInt(); B[x] = sc.nextInt() B[x] B x sc.nextInt() sc.nextInt sc for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		} int y=0; int y=0; y 0 y<N y N y++ y++ y {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		} {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		} for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			} int z=0; int z=0; z 0 z<M z M z++ z++ z {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			} {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			} A[y][z] = sc.nextInt() A[y][z] A[y] A y z sc.nextInt() sc.nextInt sc AB[y] += A[y][z]*B[z] AB[y] AB y A[y][z]*B[z] A[y][z] A[y] A y z B[z] B z int count = 0; count 0 for(int i=0; i<N; i++)if(AB[i]+C > 0)count++; int i=0; int i=0; i 0 i<N i N i++ i++ i if(AB[i]+C > 0)count++; if(AB[i]+C > 0)count++; AB[i]+C > 0 AB[i]+C AB[i] AB i C 0 count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), C = sc.nextInt();
		int B[] = new int[M];
		int A[][] = new int[N][M];
		int AB[] = new int[N];
		for(int x=0; x<M; x++)B[x] = sc.nextInt();
		for(int y=0; y<N; y++) {
			for(int z=0; z<M; z++) {
				A[y][z] = sc.nextInt();
				AB[y] += A[y][z]*B[z];
			}			
		}
		int count = 0;
		for(int i=0; i<N; i++)if(AB[i]+C > 0)count++;
		System.out.println(count);
		sc.close();
	}

}