import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	} main {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int N=stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int M=stdIn.nextInt(); M stdIn.nextInt() stdIn.nextInt stdIn int C=stdIn.nextInt(); C stdIn.nextInt() stdIn.nextInt stdIn int A[]=new int[M]; A new int[M] M int B[]=new int[M]; B new int[M] M int z=0 z 0 y=0 y 0 ans=0 ans 0 cou=0; cou 0 while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		} z<M z M {
			B[z]=stdIn.nextInt();
			z++;
		} B[z]=stdIn.nextInt() B[z] B z stdIn.nextInt() stdIn.nextInt stdIn z++ z z=0 z 0 while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		} y<N y N {
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		} while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			} z<M z M {
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			} A[z]=stdIn.nextInt() A[z] A z stdIn.nextInt() stdIn.nextInt stdIn cou+=A[z]*B[z] cou A[z]*B[z] A[z] A z B[z] B z z++ z z=0 z 0 cou+=C cou C if(cou>0)
				ans++; cou>0 cou 0 ans++ ans cou=0 cou 0 y++ y System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int C=stdIn.nextInt();
		int A[]=new int[M];
		int B[]=new int[M];
		int z=0,y=0,ans=0,cou=0;
		while(z<M){
			B[z]=stdIn.nextInt();
			z++;
		}z=0;
		while(y<N){
			while(z<M){
				A[z]=stdIn.nextInt();
				cou+=A[z]*B[z];
				z++;
			}z=0;
			cou+=C;
			if(cou>0)
				ans++;
			cou=0;
			y++;
		}
		System.out.println(ans);
	}

}