import 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[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	}
} import java.util.*; util.* java 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[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	}
} 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[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	} 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[] b = new int[m]; b new int[m] m int crt = 0; crt 0 for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			b[i]=sc.nextInt();
		} {
			b[i]=sc.nextInt();
		} b[i]=sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		} {
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		} int a=0; a 0 for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				a+=sc.nextInt()*b[j];
			} {
				a+=sc.nextInt()*b[j];
			} a+=sc.nextInt()*b[j] a sc.nextInt()*b[j] sc.nextInt() sc.nextInt sc b[j] b j a+=c a c if(a>0)crt++; a>0 a 0 crt++ crt System.out.print(crt) System.out.print System.out System System.out crt 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[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	}
} 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[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	}
} Main
import 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[] b = new int[m];
		int crt = 0;
		for(int i=0;i<m;i++){
			b[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			int a=0;
			for(int j=0;j<m;j++){
				a+=sc.nextInt()*b[j];
			}
			a+=c;
			if(a>0)crt++;
		}
		System.out.print(crt);
	}
}