import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	}

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

} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	}

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

} Main InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	} _main {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	} Scanner sc = new Scanner(in); sc new Scanner(in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int[] B = new int[M]; B new int[M] M for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < B.length i B.length B B.length 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 ans = 0; ans 0 for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		} {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		} int[] A = new int[M]; A new int[M] M int x = C; x C for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			} int i = 0; int i = 0; i 0 i < A.length i A.length A A.length i++ i++ i {
				int a = sc.nextInt();
				x += (a * B[i]);
			} {
				int a = sc.nextInt();
				x += (a * B[i]);
			} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc x += (a * B[i]) x (a * B[i]) a B[i] B i if (x > 0) {
				ans++;
			} x > 0 x 0 {
				ans++;
			} ans++ ans out.println(ans) out.println out ans sc.close() sc.close sc String[] args args public static void main(String[] args) {
		new Main()._main(args);
	} main {
		new Main()._main(args);
	} new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	}

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

} public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	}

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

} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int[] B = new int[M];
		for (int i = 0; i < B.length; i++) {
			B[i] = sc.nextInt();
		}

		int ans = 0;

		for (int j = 0; j < N; j++) {
			int[] A = new int[M];

			int x = C;
			for (int i = 0; i < A.length; i++) {
				int a = sc.nextInt();
				x += (a * B[i]);
			}

			if (x > 0) {
				ans++;
			}

		}

		out.println(ans);
		sc.close();

	}

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

}
