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 Blist[] = new int[M];
		for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		}

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    }
} 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 Blist[] = new int[M];
		for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		}

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    }
} 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 Blist[] = new int[M];
		for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		}

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();

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

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    } 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 Blist[] = new int[M]; Blist new int[M] M for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<Blist.length i Blist.length Blist Blist.length i++ i++ i {
			Blist[i] = sc.nextInt();
		} {
			Blist[i] = sc.nextInt();
		} Blist[i] = sc.nextInt() Blist[i] Blist i sc.nextInt() sc.nextInt sc int Alist[][] = new int[N][M]; Alist new int[N][M] N M for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		} int s=0; int s=0; s 0 s<N s N s++ s++ s {
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		} {
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		} for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			} int t=0; int t=0; t 0 t<M t M t++ t++ t {
				Alist[s][t] = sc.nextInt();
			} {
				Alist[s][t] = sc.nextInt();
			} Alist[s][t] = sc.nextInt() Alist[s][t] Alist[s] Alist s t sc.nextInt() sc.nextInt sc int answer = 0; answer 0 for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		} int x=0; int x=0; x 0 x<N x N x++ x++ x {
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		} {
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		} int sum = 0; sum 0 for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			} int y=0; int y=0; y 0 y<M y M y++ y++ y {
					sum += Alist[x][y] * Blist[y];
			} {
					sum += Alist[x][y] * Blist[y];
			} sum += Alist[x][y] * Blist[y] sum Alist[x][y] * Blist[y] Alist[x][y] Alist[x] Alist x y Blist[y] Blist y sum += C sum C if(sum > 0){
				answer++;
			} sum > 0 sum 0 {
				answer++;
			} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer 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 Blist[] = new int[M];
		for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		}

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    }
} 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 Blist[] = new int[M];
		for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		}

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    }
} 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 Blist[] = new int[M];
		for(int i=0; i<Blist.length; i++){
			Blist[i] = sc.nextInt();
		}

		int Alist[][] = new int[N][M];
		for(int s=0; s<N; s++){
			for(int t=0; t<M; t++){
				Alist[s][t] = sc.nextInt();
			}
		}

		int answer = 0;
		for(int x=0; x<N; x++){
			int sum = 0;
			for(int y=0; y<M; y++){
					sum += Alist[x][y] * Blist[y];
			}
			sum += C;
			if(sum > 0){
				answer++;
			}
		}

		System.out.println(answer);
    }
}