import java.io.PrintWriter;
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	}
} import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int cnt = 0; cnt 0 int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int C = Integer.parseInt(sc.next()); C Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 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] = Integer.parseInt(sc.next());
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			b[i] = Integer.parseInt(sc.next());
		} {
			b[i] = Integer.parseInt(sc.next());
		} b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		} {
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		} for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			} int j=0; int j=0; j 0 j<M j M j++ j++ j {
				a[i][j] = Integer.parseInt(sc.next());
			} {
				a[i][j] = Integer.parseInt(sc.next());
			} a[i][j] = Integer.parseInt(sc.next()) a[i][j] a[i] a i j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int keisan = 0; keisan 0 for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			} int j=0; int j=0; j 0 j<M j M j++ j++ j {
				keisan += a[i][j]*b[j];
			} {
				keisan += a[i][j]*b[j];
			} keisan += a[i][j]*b[j] keisan a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j keisan += C keisan C if(keisan>0){
				cnt++;
			} keisan>0 keisan 0 {
				cnt++;
			} cnt++ cnt out.print(cnt) out.print out cnt out.flush() out.flush out String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	}
} Main
import java.io.PrintWriter;
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//String S = sc.next();
		//int N = Integer.parseInt(sc.next());
		//out.println();
		int cnt = 0;
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int b[] = new int[M];
		int a[][]  = new int[N][M];
		for(int i=0;i<M;i++){
			b[i] = Integer.parseInt(sc.next());
		}
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				a[i][j] = Integer.parseInt(sc.next());
			}
			int keisan = 0;
			for(int j=0;j<M;j++){
				keisan += a[i][j]*b[j];
			}
			keisan += C;
			if(keisan>0){
				cnt++;
			}
		}
		

		out.print(cnt);
		out.flush();	
	}
}