import java.util.Scanner;
public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
}
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
} main {
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int d[] = new int[b]; d new int[b] b int e[] = new int[a]; e new int[a] a int f = 0; f 0 for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	} int m=0; int m=0; m 0 m<b m b m++ m++ m {
		d[m] = sc.nextInt();
	} {
		d[m] = sc.nextInt();
	} d[m] = sc.nextInt() d[m] d m sc.nextInt() sc.nextInt sc for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	} int n=0; int n=0; n 0 n<a n a n++ n++ n {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	} {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	} e[n] = 0 e[n] e n 0 for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		} int m=0; int m=0; m 0 m<b m b m++ m++ m {
			e[n] =e[n] +sc.nextInt() *d[m];
		} {
			e[n] =e[n] +sc.nextInt() *d[m];
		} e[n] =e[n] +sc.nextInt() *d[m] e[n] e n e[n] +sc.nextInt() *d[m] e[n] e n sc.nextInt() *d[m] sc.nextInt() sc.nextInt sc d[m] d m e[n] = e[n] + c e[n] e n e[n] + c e[n] e n c if (e[n] > 0)
			f++; e[n] > 0 e[n] e n 0 f++ f System.out.println(f) System.out.println System.out System System.out f sc.close() sc.close sc String[] args args public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
}
} public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int c = sc.nextInt();
	int d[] = new int[b];
	int e[] = new int[a];
	int f = 0;
	for(int m=0;m<b;m++ ) {
		d[m] = sc.nextInt();
	}
	for(int n=0;n<a;n++ ) {
		e[n] = 0;
		for(int m=0;m<b;m++ ) {
			e[n] =e[n] +sc.nextInt() *d[m];
		}
		e[n] = e[n] + c;
		if (e[n] > 0)
			f++;
	}
	System.out.println(f);
	sc.close();
}
}