import java.util.Scanner;

public class Main {

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

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

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	} 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 sum[] = new int[N]; sum new int[N] N int count = 0; count 0 int a[][] = new int[N][M]; a new int[N][M] N M int b[] = new int[M]; b new int[M] M for(int i = 0; i < M; i++) {
			b[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			b[i] = sc.nextInt();
		} {
			b[i] = sc.nextInt();
		} b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		} {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		} sum[i] = 0 sum[i] sum i 0 for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			} {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			} a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc sum[i] += a[i][j] * b[j] sum[i] sum i a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j sum[i] += C sum[i] sum i C if(sum[i] > 0) {
				count++;
			} sum[i] > 0 sum[i] sum i 0 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

} public class Main {

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

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

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

		int sum[] = new int[N];
		int count = 0;

		int a[][] = new int[N][M];
		int b[] = new int[M];

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

		for(int i = 0; i < N; i++) {
			sum[i] = 0;
			for(int j = 0; j < M; j++) {
				//System.out.println(i + "," + j);
				a[i][j] = sc.nextInt();
				sum[i] += a[i][j] * b[j];
			}
			sum[i] += C;
			if(sum[i] > 0) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

}