import java.util.*;

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

class Main{
  public static void main (String[] args){
    Scanner sc = new Scanner (System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int C = sc.nextInt();
    int array[] = new int[M];
    for (int i=0;i<M;i++){
      array[i] = sc.nextInt();
    }
    long ans = 0;
    
    for (int i=0;i<N;i++){
      int checker = C;
      for (int j=0;j<M;j++){
       checker += array[j]*(sc.nextInt());
      }
      if (checker>0){
        ans += 1;
      }
    }
    System.out.println(ans);
  }
}