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

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	}
} import java.util.ArrayList; ArrayList 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 scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan List<Integer> bList = new ArrayList<>(); bList new ArrayList<>() int ans = 0; ans 0 for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			bList.add(scan.nextInt());
		} {
			bList.add(scan.nextInt());
		} bList.add(scan.nextInt()) bList.add bList scan.nextInt() scan.nextInt scan for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		} {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		} long temp = 0; temp 0 for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				temp += bList.get(j) * scan.nextInt();
			} {
				temp += bList.get(j) * scan.nextInt();
			} temp += bList.get(j) * scan.nextInt() temp bList.get(j) * scan.nextInt() bList.get(j) bList.get bList j scan.nextInt() scan.nextInt scan if(temp + C > 0){
				ans++;
			} temp + C > 0 temp + C temp C 0 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int C = scan.nextInt();
		List<Integer> bList = new ArrayList<>();

		int ans = 0;

		for (int i = 0; i < M; i++) {
			bList.add(scan.nextInt());
		}

		for (int i = 0; i < N; i++) {
			long temp = 0;

			for (int j = 0; j < M; j++) {
				temp += bList.get(j) * scan.nextInt();
			}
			if(temp + C > 0){
				ans++;
			}

		}
		System.out.println(ans);
		scan.close();
	}
}
