import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String[] hiki = scan.nextLine().split(" ");
    int N = Integer.parseInt(hiki[0]);
    int M = Integer.parseInt(hiki[1]);
    int C = Integer.parseInt(hiki[2]);
    hiki = scan.nextLine().split(" ");
    int[] B = new int[M];
    for(int i = 0;i < M;i ++){
      B[i] = Integer.parseInt(hiki[i]);
    }
    int count = 0;
    for(int i = 0;i < N;i ++){
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    }
    System.out.println(count);
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String[] hiki = scan.nextLine().split(" ");
    int N = Integer.parseInt(hiki[0]);
    int M = Integer.parseInt(hiki[1]);
    int C = Integer.parseInt(hiki[2]);
    hiki = scan.nextLine().split(" ");
    int[] B = new int[M];
    for(int i = 0;i < M;i ++){
      B[i] = Integer.parseInt(hiki[i]);
    }
    int count = 0;
    for(int i = 0;i < N;i ++){
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    }
    System.out.println(count);
  }
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String[] hiki = scan.nextLine().split(" ");
    int N = Integer.parseInt(hiki[0]);
    int M = Integer.parseInt(hiki[1]);
    int C = Integer.parseInt(hiki[2]);
    hiki = scan.nextLine().split(" ");
    int[] B = new int[M];
    for(int i = 0;i < M;i ++){
      B[i] = Integer.parseInt(hiki[i]);
    }
    int count = 0;
    for(int i = 0;i < N;i ++){
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    }
    System.out.println(count);
  } main {
    Scanner scan = new Scanner(System.in);
    String[] hiki = scan.nextLine().split(" ");
    int N = Integer.parseInt(hiki[0]);
    int M = Integer.parseInt(hiki[1]);
    int C = Integer.parseInt(hiki[2]);
    hiki = scan.nextLine().split(" ");
    int[] B = new int[M];
    for(int i = 0;i < M;i ++){
      B[i] = Integer.parseInt(hiki[i]);
    }
    int count = 0;
    for(int i = 0;i < N;i ++){
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    }
    System.out.println(count);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String[] hiki = scan.nextLine().split(" "); hiki scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " int N = Integer.parseInt(hiki[0]); N Integer.parseInt(hiki[0]) Integer.parseInt Integer hiki[0] hiki 0 int M = Integer.parseInt(hiki[1]); M Integer.parseInt(hiki[1]) Integer.parseInt Integer hiki[1] hiki 1 int C = Integer.parseInt(hiki[2]); C Integer.parseInt(hiki[2]) Integer.parseInt Integer hiki[2] hiki 2 hiki = scan.nextLine().split(" ") hiki scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " int[] B = new int[M]; B new int[M] M for(int i = 0;i < M;i ++){
      B[i] = Integer.parseInt(hiki[i]);
    } int i = 0; int i = 0; i 0 i < M i M i ++ i ++ i {
      B[i] = Integer.parseInt(hiki[i]);
    } {
      B[i] = Integer.parseInt(hiki[i]);
    } B[i] = Integer.parseInt(hiki[i]) B[i] B i Integer.parseInt(hiki[i]) Integer.parseInt Integer hiki[i] hiki i int count = 0; count 0 for(int i = 0;i < N;i ++){
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    } int i = 0; int i = 0; i 0 i < N i N i ++ i ++ i {
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    } {
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    } int tmp = 0; tmp 0 hiki = scan.nextLine().split(" ") hiki scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      } int j = 0; int j = 0; j 0 j < M j M j ++ j ++ j {
        tmp += Integer.parseInt(hiki[j]) * B[j];
      } {
        tmp += Integer.parseInt(hiki[j]) * B[j];
      } tmp += Integer.parseInt(hiki[j]) * B[j] tmp Integer.parseInt(hiki[j]) * B[j] Integer.parseInt(hiki[j]) Integer.parseInt Integer hiki[j] hiki j B[j] B j tmp += C tmp C if(tmp > 0){
        count ++;
      } tmp > 0 tmp 0 {
        count ++;
      } count ++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String[] hiki = scan.nextLine().split(" ");
    int N = Integer.parseInt(hiki[0]);
    int M = Integer.parseInt(hiki[1]);
    int C = Integer.parseInt(hiki[2]);
    hiki = scan.nextLine().split(" ");
    int[] B = new int[M];
    for(int i = 0;i < M;i ++){
      B[i] = Integer.parseInt(hiki[i]);
    }
    int count = 0;
    for(int i = 0;i < N;i ++){
      int tmp = 0;
      hiki = scan.nextLine().split(" ");
      for(int j = 0;j < M;j ++){
        tmp += Integer.parseInt(hiki[j]) * B[j];
      }
      tmp += C;
      if(tmp > 0){
        count ++;
      }
    }
    System.out.println(count);
  }
}
