

import java.util.Arrays;
import java.util.Scanner;

class Main {

	Scanner sc = new Scanner(System.in);
	final static long LNF = 1L << 60;
	final static double EPS = 1e-9;

	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		int n = ni();
		int m = ni();
		int c = ni();

		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = ni();
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		}
		System.out.println(ans);
	}

	int ni() {
		return Integer.parseInt(sc.next());
	}

	long nl() {
		return sc.nextLong();
	}

	double nd() {
		return Double.parseDouble(sc.next());
	}

	void debug(Object... os) {
		System.out.println(Arrays.deepToString(os));
	}

	static class Util {
		static <T extends Comparable<T>> T max(T a, T b) {
			if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			}
		}

		static <T extends Comparable<T>> T min(T a, T b) {
			if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			}
		}
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {

	Scanner sc = new Scanner(System.in);
	final static long LNF = 1L << 60;
	final static double EPS = 1e-9;

	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		int n = ni();
		int m = ni();
		int c = ni();

		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = ni();
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		}
		System.out.println(ans);
	}

	int ni() {
		return Integer.parseInt(sc.next());
	}

	long nl() {
		return sc.nextLong();
	}

	double nd() {
		return Double.parseDouble(sc.next());
	}

	void debug(Object... os) {
		System.out.println(Arrays.deepToString(os));
	}

	static class Util {
		static <T extends Comparable<T>> T max(T a, T b) {
			if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			}
		}

		static <T extends Comparable<T>> T min(T a, T b) {
			if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			}
		}
	}

} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final static long LNF = 1L << 60; LNF 1L << 60 1L 60 final static double EPS = 1e-9; EPS 1e-9 public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args void run() {
		int n = ni();
		int m = ni();
		int c = ni();

		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = ni();
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		}
		System.out.println(ans);
	} run {
		int n = ni();
		int m = ni();
		int c = ni();

		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = ni();
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		}
		System.out.println(ans);
	} int n = ni(); n ni() ni int m = ni(); m ni() ni int c = ni(); c ni() ni int[] b = new int[m]; b new int[m] m for (int i = 0; i < m; i++) {
			b[i] = ni();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = ni();
		} {
			b[i] = ni();
		} b[i] = ni() b[i] b i ni() ni int ans = 0; ans 0 for (int i = 0; i < n; i++) {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		} {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		} int total = 0; total 0 for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				int a = ni();
				total += b[j] * a;
			} {
				int a = ni();
				total += b[j] * a;
			} int a = ni(); a ni() ni total += b[j] * a total b[j] * a b[j] b j a if (total + c > 0) {
				++ans;

			} total + c > 0 total + c total c 0 {
				++ans;

			} ++ans ans System.out.println(ans) System.out.println System.out System System.out ans int ni() {
		return Integer.parseInt(sc.next());
	} ni {
		return Integer.parseInt(sc.next());
	} return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long nl() {
		return sc.nextLong();
	} nl {
		return sc.nextLong();
	} return sc.nextLong(); sc.nextLong() sc.nextLong sc double nd() {
		return Double.parseDouble(sc.next());
	} nd {
		return Double.parseDouble(sc.next());
	} return Double.parseDouble(sc.next()); Double.parseDouble(sc.next()) Double.parseDouble Double sc.next() sc.next sc void debug(Object... os) {
		System.out.println(Arrays.deepToString(os));
	} debug {
		System.out.println(Arrays.deepToString(os));
	} System.out.println(Arrays.deepToString(os)) System.out.println System.out System System.out Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os static class Util {
		static <T extends Comparable<T>> T max(T a, T b) {
			if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			}
		}

		static <T extends Comparable<T>> T min(T a, T b) {
			if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			}
		}
	} Util static <T extends Comparable<T>> T max(T a, T b) {
			if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			}
		} max {
			if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			}
		} if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			} a.compareTo(b) > 0 a.compareTo(b) a.compareTo a b 0 {
				return a;
			} return a; a {
				return b;
			} return b; b T a a T b b static <T extends Comparable<T>> T min(T a, T b) {
			if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			}
		} min {
			if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			}
		} if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			} a.compareTo(b) < 0 a.compareTo(b) a.compareTo a b 0 {
				return a;
			} return a; a {
				return b;
			} return b; b T a a T b b


import java.util.Arrays;
import java.util.Scanner;

class Main {

	Scanner sc = new Scanner(System.in);
	final static long LNF = 1L << 60;
	final static double EPS = 1e-9;

	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		int n = ni();
		int m = ni();
		int c = ni();

		int[] b = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = ni();
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			int total = 0;
			for (int j = 0; j < m; j++) {
				int a = ni();
				total += b[j] * a;
			}
			if (total + c > 0) {
				++ans;

			}

		}
		System.out.println(ans);
	}

	int ni() {
		return Integer.parseInt(sc.next());
	}

	long nl() {
		return sc.nextLong();
	}

	double nd() {
		return Double.parseDouble(sc.next());
	}

	void debug(Object... os) {
		System.out.println(Arrays.deepToString(os));
	}

	static class Util {
		static <T extends Comparable<T>> T max(T a, T b) {
			if (a.compareTo(b) > 0) {
				return a;
			} else {
				return b;
			}
		}

		static <T extends Comparable<T>> T min(T a, T b) {
			if (a.compareTo(b) < 0) {
				return a;
			} else {
				return b;
			}
		}
	}

}
