import java.util.*;
 
class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int sous = sc.nextInt();
      	int kazu = sc.nextInt();
       	int C = sc.nextInt();
        int flag = 0;
        int sam = 0;
      int b[] = new int[kazu];
      
      for(int i=0;i<kazu;i++){b[i] = sc.nextInt();}
      for(int j=0;j<sous;j++){
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      }
      
       System.out.print(flag);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int sous = sc.nextInt();
      	int kazu = sc.nextInt();
       	int C = sc.nextInt();
        int flag = 0;
        int sam = 0;
      int b[] = new int[kazu];
      
      for(int i=0;i<kazu;i++){b[i] = sc.nextInt();}
      for(int j=0;j<sous;j++){
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      }
      
       System.out.print(flag);
    }
} Main public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int sous = sc.nextInt();
      	int kazu = sc.nextInt();
       	int C = sc.nextInt();
        int flag = 0;
        int sam = 0;
      int b[] = new int[kazu];
      
      for(int i=0;i<kazu;i++){b[i] = sc.nextInt();}
      for(int j=0;j<sous;j++){
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      }
      
       System.out.print(flag);
    } main {
      
        Scanner sc = new Scanner(System.in);
        int sous = sc.nextInt();
      	int kazu = sc.nextInt();
       	int C = sc.nextInt();
        int flag = 0;
        int sam = 0;
      int b[] = new int[kazu];
      
      for(int i=0;i<kazu;i++){b[i] = sc.nextInt();}
      for(int j=0;j<sous;j++){
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      }
      
       System.out.print(flag);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int sous = sc.nextInt(); sous sc.nextInt() sc.nextInt sc int kazu = sc.nextInt(); kazu sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int flag = 0; flag 0 int sam = 0; sam 0 int b[] = new int[kazu]; b new int[kazu] kazu for(int i=0;i<kazu;i++){b[i] = sc.nextInt();} int i=0; int i=0; i 0 i<kazu i kazu 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 j=0;j<sous;j++){
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      } int j=0; int j=0; j 0 j<sous j sous j++ j++ j {
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      } {
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      } sam = 0 sam 0 for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } int k=0; int k=0; k 0 k<kazu k kazu k++ k++ k {
          sam += sc.nextInt()*b[k];
        } {
          sam += sc.nextInt()*b[k];
        } sam += sc.nextInt()*b[k] sam sc.nextInt()*b[k] sc.nextInt() sc.nextInt sc b[k] b k if(sam+C>0){flag++;} sam+C>0 sam+C sam C 0 {flag++;} flag++ flag System.out.print(flag) System.out.print System.out System System.out flag String[] args args
import java.util.*;
 
class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int sous = sc.nextInt();
      	int kazu = sc.nextInt();
       	int C = sc.nextInt();
        int flag = 0;
        int sam = 0;
      int b[] = new int[kazu];
      
      for(int i=0;i<kazu;i++){b[i] = sc.nextInt();}
      for(int j=0;j<sous;j++){
        sam = 0;
        for(int k=0;k<kazu;k++){
          sam += sc.nextInt()*b[k];
        } if(sam+C>0){flag++;}
      }
      
       System.out.print(flag);
    }
}