import java.util.*;
public 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 B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  }
} import java.util.*; util.* java public 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 B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  }
} 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 B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int C = sc.nextInt();
    int B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  } 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 B[] = new int[M]; B new int[M] M for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    } int j=0; int j=0; j 0 j<M j M j++ j++ j {
      B[j] = sc.nextInt();
    } {
      B[j] = sc.nextInt();
    } B[j] = sc.nextInt() B[j] B j sc.nextInt() sc.nextInt sc int r=0; r 0 for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    } {
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    } int s=C; s C for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      } int b B {
        int a = sc.nextInt();
        s += a*b;
      } {
        int a = sc.nextInt();
        s += a*b;
      } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc s += a*b s a*b a b if(s>0){
        r++;
      } s>0 s 0 {
        r++;
      } r++ r System.out.println(r) System.out.println System.out System System.out r String[] args args public 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 B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  }
} public 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 B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  }
} Main
import java.util.*;
public 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 B[] = new int[M];
    for(int j=0; j<M; j++){
      B[j] = sc.nextInt();
    }
    int r=0;
    for(int i=0; i<N; i++){
      int s=C;
      for(int b: B){
        int a = sc.nextInt();
        s += a*b;
      }
      if(s>0){
        r++;
      }
    }
    System.out.println(r);
  }
}