import java.util.Scanner;

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

class Main {
  public static void main(String args[]) {
        Scanner scanner1 = new Scanner(System.in);
       
        int N = scanner1.nextInt();
        int M = scanner1.nextInt();
        int C = scanner1.nextInt();
        
        int B[] = new int[M];
        int A[][] = new int[N][M];
        
        for(int i = 0;i < M;i++){
        	B[i] = scanner1.nextInt();
        }
        for(int i = 0;i < N;i++){
        	for(int j = 0;j < M;j++){
        		A[i][j] = scanner1.nextInt();
        	}
        }
        
        int count = 0;
        int sum = 0;
        for(int i = 0;i < N;i++){
        	sum = 0;
        	for(int j = 0;j < M;j++){
        		sum = sum + A[i][j]*B[j];
        	}
        	sum = sum+C;
        	if(sum > 0){
        		count++;
        	}
        }
        System.out.println(count);
  }
}