import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int c = in.nextInt(); c in.nextInt() in.nextInt in int[] b = new int[m]; b new int[m] m int ret = 0; ret 0 for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = in.nextInt();
		} {
			b[i] = in.nextInt();
		} b[i] = in.nextInt() b[i] b i in.nextInt() in.nextInt in for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		} {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		} int sum = 0; sum 0 for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				int a = in.nextInt();
				sum += a * b[i];
			} {
				int a = in.nextInt();
				sum += a * b[i];
			} int a = in.nextInt(); a in.nextInt() in.nextInt in sum += a * b[i] sum a * b[i] a b[i] b i if (sum + c > 0) {
				ret++;
			} sum + c > 0 sum + c sum c 0 {
				ret++;
			} ret++ ret System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	}

} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int c = in.nextInt();
		int[] b = new int[m];
		int ret = 0;
		for (int i = 0; i < m; i++) {
			b[i] = in.nextInt();
		}
		for (int j = 0; j < n; j++) {
			int sum = 0;
			for (int i = 0; i < m; i++) {
				int a = in.nextInt();
				sum += a * b[i];
			}
			if (sum + c > 0) {
				ret++;
			}
		}
		System.out.println(ret);
	}

}
