import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    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 number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    System.out.println(count);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int number_n number_n number_m number_m number_c number_c i i j j temp_sum temp_sum count = 0; count 0 number_n = Integer.parseInt(sc.next()) number_n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc number_m = Integer.parseInt(sc.next()) number_m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc number_c = Integer.parseInt(sc.next()) number_c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] array_b = new int[number_m]; array_b new int[number_m] number_m int[] array_a = new int[number_m]; array_a new int[number_m] number_m for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next()); i = 0; i = 0 i 0 i < number_m i number_m i++ i++ i array_b[i] = Integer.parseInt(sc.next()); array_b[i] = Integer.parseInt(sc.next()) array_b[i] array_b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    } i = 0; i = 0 i 0 i < number_n i number_n i++ i++ i {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    } {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    } temp_sum = number_c temp_sum number_c for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      } j = 0; j = 0 j 0 j < number_m j number_m j++ j++ j {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      } {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      } array_a[j] = Integer.parseInt(sc.next()) array_a[j] array_a j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc temp_sum += array_a[j] * array_b[j] temp_sum array_a[j] * array_b[j] array_a[j] array_a j array_b[j] array_b j if(temp_sum > 0) count++; temp_sum > 0 temp_sum 0 count++ count 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 number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    System.out.println(count);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, number_c, i, j, temp_sum, count = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    number_c = Integer.parseInt(sc.next());
    int[] array_b = new int[number_m];
    int[] array_a = new int[number_m];
    for(i = 0; i < number_m; i++) array_b[i] = Integer.parseInt(sc.next());
    for(i = 0; i < number_n; i++) {
      temp_sum = number_c;
      for(j = 0; j < number_m; j++) {
        array_a[j] = Integer.parseInt(sc.next());
        temp_sum += array_a[j] * array_b[j];
      }
      if(temp_sum > 0) count++;
    }
    System.out.println(count);
  }
}
