import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	} 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 int ans = 0; ans 0 int b[] = new int[m]; b new int[m] m for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = scan.nextInt();
		} {
			b[i] = scan.nextInt();
		} b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan int num = 0; num 0 for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		} {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		} for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				num += scan.nextInt() * b[j];
			} {
				num += scan.nextInt() * b[j];
			} num += scan.nextInt() * b[j] num scan.nextInt() * b[j] scan.nextInt() scan.nextInt scan b[j] b j if (num + c > 0)  ans++; num + c > 0 num + c num c 0 ans++ ans num = 0 num 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();
		int ans = 0;
		int b[] = new int[m];

		for (int i = 0; i < m; i++) {
			b[i] = scan.nextInt();
		}

		int num = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				num += scan.nextInt() * b[j];
			}
			if (num + c > 0)  ans++;
			num = 0;
		}
		System.out.println(ans);
	}

}