import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int N  = keyboard.nextInt(); N keyboard.nextInt() keyboard.nextInt keyboard int M = keyboard.nextInt(); M keyboard.nextInt() keyboard.nextInt keyboard int C = keyboard.nextInt(); C keyboard.nextInt() keyboard.nextInt keyboard int[]B = new int[M]; B new int[M] M for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			B[i] = keyboard.nextInt();
		} {
			B[i] = keyboard.nextInt();
		} B[i] = keyboard.nextInt() B[i] B i keyboard.nextInt() keyboard.nextInt keyboard int[][]A = new int[N][M]; A new int[N][M] N M for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		} int j=0; int j=0; j 0 j<N j N j++ j++ j {
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		} {
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		} for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			} int k=0; int k=0; k 0 k<M k M k++ k++ k {
				A[j][k] = keyboard.nextInt();
			} {
				A[j][k] = keyboard.nextInt();
			} A[j][k] = keyboard.nextInt() A[j][k] A[j] A j k keyboard.nextInt() keyboard.nextInt keyboard int culc = 0; culc 0 int ans = 0; ans 0 for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		} int n=0; int n=0; n 0 n<N n N n++ n++ n {
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		} {
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		} culc = 0 culc 0 for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				} int m=0; int m=0; m 0 m<M m M m++ m++ m {
				culc += A[n][m]*B[m];
				} {
				culc += A[n][m]*B[m];
				} culc += A[n][m]*B[m] culc A[n][m]*B[m] A[n][m] A[n] A n m B[m] B m if(culc+C>0){
				ans++;
			} culc+C>0 culc+C culc C 0 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M = keyboard.nextInt();
		int C = keyboard.nextInt();
		
		int[]B = new int[M];
		for(int i=0; i<M; i++){
			B[i] = keyboard.nextInt();
		}
		
		int[][]A = new int[N][M];
		for(int j=0; j<N; j++){
			for(int k=0; k<M; k++){
				A[j][k] = keyboard.nextInt();
			}
		}
		
		int culc = 0;
		int ans = 0;
		
		for(int n=0; n<N; n++){
			culc = 0;
			for(int m=0; m<M; m++){
				culc += A[n][m]*B[m];
				}
			if(culc+C>0){
				ans++;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
}