import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int[] b_m = new int[m];
		int[][] a_nm = new int[n][m];
		for (int i = 0; i < m; i++) {
			b_m[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a_nm[i][j] = sc.nextInt();
			}
		}
		sc.close();
		int count = 0;
		for (int i = 0; i < n; i++) {
			int ans = c;
			for (int j = 0; j < m; j++) {
				ans += a_nm[i][j] * b_m[j];
			}
			if (ans > 0) {
				count++;
			}
		}
		System.out.println(count);
	}

} 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();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int[] b_m = new int[m];
		int[][] a_nm = new int[n][m];
		for (int i = 0; i < m; i++) {
			b_m[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a_nm[i][j] = sc.nextInt();
			}
		}
		sc.close();
		int count = 0;
		for (int i = 0; i < n; i++) {
			int ans = c;
			for (int j = 0; j < m; j++) {
				ans += a_nm[i][j] * b_m[j];
			}
			if (ans > 0) {
				count++;
			}
		}
		System.out.println(count);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int[] b_m = new int[m];
		int[][] a_nm = new int[n][m];
		for (int i = 0; i < m; i++) {
			b_m[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a_nm[i][j] = sc.nextInt();
			}
		}
		sc.close();
		int count = 0;
		for (int i = 0; i < n; i++) {
			int ans = c;
			for (int j = 0; j < m; j++) {
				ans += a_nm[i][j] * b_m[j];
			}
			if (ans > 0) {
				count++;
			}
		}
		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int[] b_m = new int[m];
		int[][] a_nm = new int[n][m];
		for (int i = 0; i < m; i++) {
			b_m[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a_nm[i][j] = sc.nextInt();
			}
		}
		sc.close();
		int count = 0;
		for (int i = 0; i < n; i++) {
			int ans = c;
			for (int j = 0; j < m; j++) {
				ans += a_nm[i][j] * b_m[j];
			}
			if (ans > 0) {
				count++;
			}
		}
		System.out.println(count);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int[] b_m = new int[m];
		int[][] a_nm = new int[n][m];
		for (int i = 0; i < m; i++) {
			b_m[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				a_nm[i][j] = sc.nextInt();
			}
		}
		sc.close();
		int count = 0;
		for (int i = 0; i < n; i++) {
			int ans = c;
			for (int j = 0; j < m; j++) {
				ans += a_nm[i][j] * b_m[j];
			}
			if (ans > 0) {
				count++;
			}
		}
		System.out.println(count);
	}

}
