import java.util.*;

public class Main{
    public static void main(String args[]){ 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    }
} import java.util.*; util.* java public class Main{
    public static void main(String args[]){ 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    }
} Main public static void main(String args[]){ 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    } main { 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn int M = scn.nextInt(); M scn.nextInt() scn.nextInt scn int C = scn.nextInt(); C scn.nextInt() scn.nextInt scn int[][] A = new int[N][M]; A new int[N][M] N M int[] B = new int[M]; B new int[M] M int[] ans = new	int[N]; ans new	int[N] N int count =0; count 0 for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    } int k=0; int k=0; k 0 k<M k M k++ k++ k {
    	B[k] = scn.nextInt();
    } {
    	B[k] = scn.nextInt();
    } B[k] = scn.nextInt() B[k] B k scn.nextInt() scn.nextInt scn for(int m=0;m<N;m++){
    	ans[m] +=C;
    } int m=0; int m=0; m 0 m<N m N m++ m++ m {
    	ans[m] +=C;
    } {
    	ans[m] +=C;
    } ans[m] +=C ans[m] ans m C for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    } 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]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    } {
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    } for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        } int j=0; int j=0; j 0 j<M j M j++ j++ j {
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        } {
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        } A[i][j]=scn.nextInt() A[i][j] A[i] A i j scn.nextInt() scn.nextInt scn ans[i] += A[i][j]*B[j] ans[i] ans i A[i][j]*B[j] A[i][j] A[i] A i j B[j] B j for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    } int m=0; int m=0; m 0 m<N m N m++ m++ m {
    	if(ans[m]>0){
        count++;
        }
    } {
    	if(ans[m]>0){
        count++;
        }
    } if(ans[m]>0){
        count++;
        } ans[m]>0 ans[m] ans m 0 {
        count++;
        } count++ count System.out.print(count) System.out.print System.out System System.out count String args[] args public class Main{
    public static void main(String args[]){ 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    }
} public class Main{
    public static void main(String args[]){ 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    }
} Main
import java.util.*;

public class Main{
    public static void main(String args[]){ 

	Scanner scn = new Scanner(System.in);
	int N = scn.nextInt();
	int M = scn.nextInt();
    int C = scn.nextInt();
      
  	int[][] A = new int[N][M];
    int[] B = new int[M];
    int[] ans = new	int[N];
    int count =0;

    for(int k=0;k<M;k++){
    	B[k] = scn.nextInt();
    }
    for(int m=0;m<N;m++){
    	ans[m] +=C;
    }
      
	for(int i=0;i<N;i++){
    	for(int j=0;j<M;j++){
        A[i][j]=scn.nextInt();
        ans[i] += A[i][j]*B[j];
        }
    }
    
    for(int m=0;m<N;m++){
    	if(ans[m]>0){
        count++;
        }
    }

      System.out.print(count);

    }
}