import java.util.Scanner;
import java.lang.Math;
import java.util.ArrayList;
import java.util.List;
//List<Integer> list = new ArrayList<>();

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

		int ans = 0;
		int sum;
		for (int i = 0; i < n; i++) {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		}

		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++)
			b[i] = stdIn.nextInt();
		int[][] a = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)	
				a[i][j] = stdIn.nextInt();
		}

		int ans = 0;
		int sum;
		for (int i = 0; i < n; i++) {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		}

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

		int ans = 0;
		int sum;
		for (int i = 0; i < n; i++) {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		}

		System.out.println(ans);
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		int[] b = new int[m];
		for (int i = 0; i < m; i++)
			b[i] = stdIn.nextInt();
		int[][] a = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)	
				a[i][j] = stdIn.nextInt();
		}

		int ans = 0;
		int sum;
		for (int i = 0; i < n; i++) {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		}

		System.out.println(ans);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int m = stdIn.nextInt(); m stdIn.nextInt() stdIn.nextInt stdIn int c = stdIn.nextInt(); c stdIn.nextInt() stdIn.nextInt stdIn int[] b = new int[m]; b new int[m] m for (int i = 0; i < m; i++)
			b[i] = stdIn.nextInt(); int i = 0; int i = 0; i 0 i < m i m i++ i++ i b[i] = stdIn.nextInt(); b[i] = stdIn.nextInt() b[i] b i stdIn.nextInt() stdIn.nextInt stdIn int[][] a = new int[n][m]; a new int[n][m] n m for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++)	
				a[i][j] = stdIn.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < m; j++)	
				a[i][j] = stdIn.nextInt();
		} {
			for (int j = 0; j < m; j++)	
				a[i][j] = stdIn.nextInt();
		} for (int j = 0; j < m; j++)	
				a[i][j] = stdIn.nextInt(); int j = 0; int j = 0; j 0 j < m j m j++ j++ j a[i][j] = stdIn.nextInt(); a[i][j] = stdIn.nextInt() a[i][j] a[i] a i j stdIn.nextInt() stdIn.nextInt stdIn int ans = 0; ans 0 int sum; sum for (int i = 0; i < n; i++) {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		} {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		} sum = c sum c for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j]; int j = 0; int j = 0; j 0 j < m j m j++ j++ j sum = sum + a[i][j] * b[j]; sum = sum + a[i][j] * b[j] sum sum + a[i][j] * b[j] sum a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j ans = (sum > 0) ? ans + 1 : ans ans (sum > 0) ? ans + 1 : ans (sum > 0) sum 0 ans + 1 ans 1 ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;
import java.lang.Math;
import java.util.ArrayList;
import java.util.List;
//List<Integer> list = new ArrayList<>();

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

		int ans = 0;
		int sum;
		for (int i = 0; i < n; i++) {
			sum = c;
			for (int j = 0; j < m; j++)
				sum = sum + a[i][j] * b[j];
			ans = (sum > 0) ? ans + 1 : ans;
		}

		System.out.println(ans);
	}
}