import java.util.*;

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

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