import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	}
} 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(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc m = sc.nextInt() m sc.nextInt() sc.nextInt sc c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int[] b = new int[m]; b new int[m] m 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 int sum = 0 sum 0 a = 0 a 0 cnt = 0; cnt 0 for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		} int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		} {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		} sum = 0 sum 0 for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			} int k = 0; int k = 0; k 0 k < m k m k++ k++ k {
				a = sc.nextInt();
				sum += a * b[k];
			} {
				a = sc.nextInt();
				sum += a * b[k];
			} a = sc.nextInt() a sc.nextInt() sc.nextInt sc sum += a * b[k] sum a * b[k] a b[k] b k sum += c sum c if(sum > 0) cnt++; sum > 0 sum 0 cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt();
		int[] b = new int[m];
		for(int i = 0;i < m;i ++) {
			b[i] = sc.nextInt();
		}
		int sum = 0,a = 0,cnt = 0;
		for(int i = 0;i < n;i ++) {
			sum = 0;
			for(int k = 0;k < m;k++) {
				a = sc.nextInt();
				sum += a * b[k];
			}
			sum += c;
			if(sum > 0) cnt++;
		}
		System.out.println(cnt);
	}
}