import java.util.Scanner;
public class Main{
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	}
} Main public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	} main {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int b=scan.nextInt(); b scan.nextInt() scan.nextInt scan int c=scan.nextInt(); c scan.nextInt() scan.nextInt scan int e[]=new int[b]; e new int[b] b int count=0; count 0 int ans=0; ans 0 for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	} int i=0; int i=0; i 0 i<b i b i++ i++ i {
		e[i]=scan.nextInt();
	} {
		e[i]=scan.nextInt();
	} e[i]=scan.nextInt() e[i] e i scan.nextInt() scan.nextInt scan for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	} int i=0; int i=0; i 0 i<a i a i++ i++ i {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	} {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	} count=0 count 0 for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		} int j=0; int j=0; j 0 j<b j b j++ j++ j {
			int f=scan.nextInt()*e[j];
			count+=f;
		} {
			int f=scan.nextInt()*e[j];
			count+=f;
		} int f=scan.nextInt()*e[j]; f scan.nextInt()*e[j] scan.nextInt() scan.nextInt scan e[j] e j count+=f count f if(count+c>0) {
			ans++;
		} count+c>0 count+c count c 0 {
			ans++;
		} ans++ ans 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 scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	}
} public class Main{
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	}
} Main
import java.util.Scanner;
public class Main{
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int e[]=new int[b];
	int count=0;
	int ans=0;
	for(int i=0;i<b;i++) {
		e[i]=scan.nextInt();
	}
	for(int i=0;i<a;i++) {
		count=0;
		for(int j=0;j<b;j++){
			int f=scan.nextInt()*e[j];
			count+=f;
		}
		if(count+c>0) {
			ans++;
		}
	}
	System.out.println(ans);
	}
}
