import java.util.Scanner;

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

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

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

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

} Main
import java.util.Scanner;

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

}