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(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + 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) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		}
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		}
		System.out.println(ans);
		sc.close();
	} 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 b[] = new int[m] b new int[m] m ans = 0; ans 0 for (int j = 0; j < m; j++)
			b[j] = sc.nextInt(); int j = 0; int j = 0; j 0 j < m j m j++ j++ j b[j] = sc.nextInt(); b[j] = sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		} {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		} int val = 0; val 0 for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j]; int j = 0; int j = 0; j 0 j < m j m j++ j++ j val += sc.nextInt() * b[j]; val += sc.nextInt() * b[j] val sc.nextInt() * b[j] sc.nextInt() sc.nextInt sc b[j] b j if (val + c > 0)
				++ans; val + c > 0 val + c val c 0 ++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) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), c = sc.nextInt(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		}
		System.out.println(ans);
		sc.close();
	}
} 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(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		}
		System.out.println(ans);
		sc.close();
	}
} 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(), b[] = new int[m], ans = 0;
		for (int j = 0; j < m; j++)
			b[j] = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int val = 0;
			for (int j = 0; j < m; j++)
				val += sc.nextInt() * b[j];
			if (val + c > 0)
				++ans;
		}
		System.out.println(ans);
		sc.close();
	}
}
