import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] b = new int[m]; b new int[m] m for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		} int i = 0; int i = 0; i 0 i < b.length i b.length b b.length i++ i++ i {
			b[i] = Integer.parseInt(sc.next());
		} {
			b[i] = Integer.parseInt(sc.next());
		} b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[][] a = new int[n][m]; a new int[n][m] n m for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		} {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		} for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			} int j = 0; int j = 0; j 0 j < a[i].length j a[i].length a[i] a i a[i].length j++ j++ j {
				a[i][j] = Integer.parseInt(sc.next());
			} {
				a[i][j] = Integer.parseInt(sc.next());
			} a[i][j] = Integer.parseInt(sc.next()) a[i][j] a[i] a i j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		} {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		} int sum = 0; sum 0 for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < a[i].length j a[i].length a[i] a i a[i].length j++ j++ j {
				sum += a[i][j] * b[j];
			} {
				sum += a[i][j] * b[j];
			} sum += a[i][j] * b[j] sum a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j if (sum + c > 0) {
				ans++;
			} sum + c > 0 sum + c sum c 0 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int[] b = new int[m];
		for (int i = 0; i < b.length; i++) {
			b[i] = Integer.parseInt(sc.next());
		}
		int[][] a = new int[n][m];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				a[i][j] = Integer.parseInt(sc.next());
			}
		}
		int ans = 0;
		for (int i = 0; i < a.length; i++) {
			int sum = 0;
			for (int j = 0; j < a[i].length; j++) {
				sum += a[i][j] * b[j];
			}
			if (sum + c > 0) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
}