import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  } main {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner int C = scanner.nextInt(); C scanner.nextInt() scanner.nextInt scanner int[] B = new int[M]; B new int[M] M for (int i = 0; i < M; i++) B[i] = scanner.nextInt(); int i = 0; int i = 0; i 0 i < M i M i++ i++ i B[i] = scanner.nextInt(); B[i] = scanner.nextInt() B[i] B i scanner.nextInt() scanner.nextInt scanner int tot = 0; tot 0 for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    } {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    } int r = C; r C for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j]; int j = 0; int j = 0; j 0 j < M j M j++ j++ j r += scanner.nextInt() * B[j]; r += scanner.nextInt() * B[j] r scanner.nextInt() * B[j] scanner.nextInt() scanner.nextInt scanner B[j] B j if (r > 0) tot++; r > 0 r 0 tot++ tot System.out.println(tot) System.out.println System.out System System.out tot String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int C = scanner.nextInt();
    int[] B = new int[M];
    for (int i = 0; i < M; i++) B[i] = scanner.nextInt();
    int tot = 0;
    for (int i = 0; i < N; i++) {
      int r = C;
      for (int j = 0; j < M; j++) r += scanner.nextInt() * B[j];
      if (r > 0) tot++;
    }
    System.out.println(tot);
  }
}
