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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   }
} 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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   }
} 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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   } 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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   } 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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      } int i = 0; int i = 0; i 0 i < b.length i b.length b b.length i++ i++ i {
         b[i] = sc.nextInt();
      } {
         b[i] = sc.nextInt();
      } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      } {

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      } int sum = 0; sum 0 int[] a = new int[M]; a new int[M] M for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            a[i] = sc.nextInt();
         } {
            a[i] = sc.nextInt();
         } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            sum = sum + a[i] *  b[i];
         } {
            sum = sum + a[i] *  b[i];
         } sum = sum + a[i] *  b[i] sum sum + a[i] *  b[i] sum a[i] *  b[i] a[i] a i b[i] b i sum = sum + c sum sum + c sum c if (sum > 0) {
            count = count + 1;
         } sum > 0 sum 0 {
            count = count + 1;
         } count = count + 1 count count + 1 count 1 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) {
      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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   }
} 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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   }
} 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 i = 0; i < b.length; i++) {
         b[i] = sc.nextInt();
      }

      int count = 0;

      for(int j = 0; j < N; j++){

         int sum = 0;

         int[] a = new int[M];
         for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
         }

         for(int i = 0; i < M; i++){
            sum = sum + a[i] *  b[i];
         }

         sum = sum + c;
  
         if (sum > 0) {
            count = count + 1;
         }
      }

      System.out.println(count);


   }
}