import java.util.Scanner;

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[] arrayb=new int[m];
		int[] arraya=new int[m];
		for(int i=0;i<m;i++) {
			arrayb[i]=sc.nextInt();
		}
		int count=0,count1=0;
		for(int j=0;j<n;j++) {
			for(int i=0;i<m;i++) {
				count+=sc.nextInt()*arrayb[i];
			}
			count+=c;
			if(count>0) {
				count1++;
			}
			count=0;
		}
		System.out.println(count1);
	}
}

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));

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

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[] arrayb=new int[m];
		int[] arraya=new int[m];
		for(int i=0;i<m;i++) {
			arrayb[i]=sc.nextInt();
		}
		int count=0,count1=0;
		for(int j=0;j<n;j++) {
			for(int i=0;i<m;i++) {
				count+=sc.nextInt()*arrayb[i];
			}
			count+=c;
			if(count>0) {
				count1++;
			}
			count=0;
		}
		System.out.println(count1);
	}
}

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));


