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[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    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[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    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[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    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[] array1 = new int[m]; array1 new int[m] m int[] array2 = new int[m]; array2 new int[m] m int sum = 0; sum 0 int count = 0; count 0 for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    } int i=0; int i=0; i 0 i<m i m i++ i++ i {
      array2[i] = sc.nextInt();
    } {
      array2[i] = sc.nextInt();
    } array2[i] = sc.nextInt() array2[i] array2 i sc.nextInt() sc.nextInt sc for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    } {
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    } for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      } int j=0; int j=0; j 0 j<m j m j++ j++ j {
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      } {
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      } array1[j] = sc.nextInt() array1[j] array1 j sc.nextInt() sc.nextInt sc sum += array1[j] * array2[j] sum array1[j] * array2[j] array1[j] array1 j array2[j] array2 j sum += c sum c if(sum>0){
        count +=1;
      } sum>0 sum 0 {
        count +=1;
      } count +=1 count 1 sum =0 sum 0 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[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    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[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    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[] array1 = new int[m];
    int[] array2 = new int[m];
    int sum = 0;
    int count = 0;

    for(int i=0; i<m; i++){
      array2[i] = sc.nextInt();
    }

    for(int i=0; i<n; i++){
      for(int j=0; j<m; j++){
        array1[j] = sc.nextInt();
        sum += array1[j] * array2[j];
      }
      sum += c;
      if(sum>0){
        count +=1;
      }
      sum =0;
    }
    System.out.println(count);
  }
}