import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  }
} Main public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  } main {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  } try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    } {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 sc.nextLine() sc.nextLine sc int[] BArray = new int[M]; BArray new int[M] M int answer = 0; answer 0 for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      } int i = 0; int i = 0; i 0 i < BArray.length i BArray.length BArray BArray.length i++ i++ i {
        BArray[i] = sc.nextInt();
      } {
        BArray[i] = sc.nextInt();
      } BArray[i] = sc.nextInt() BArray[i] BArray i sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      } {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      } int result = 0; result 0 for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
          result += sc.nextInt() * BArray[j];
        } {
          result += sc.nextInt() * BArray[j];
        } result += sc.nextInt() * BArray[j] result sc.nextInt() * BArray[j] sc.nextInt() sc.nextInt sc BArray[j] BArray j if (0 < (result + C)) {
          answer++;
        } 0 < (result + C) 0 (result + C) result C {
          answer++;
        } answer++ answer sc.nextLine() sc.nextLine sc System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  }
} public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in);) {
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      sc.nextLine();

      int[] BArray = new int[M];
      int answer = 0;
      for (int i = 0; i < BArray.length; i++) {
        BArray[i] = sc.nextInt();
      }
      sc.nextLine();
      for (int i = 0; i < N; i++) {
        int result = 0;
        for (int j = 0; j < M; j++) {
          result += sc.nextInt() * BArray[j];
        }
        if (0 < (result + C)) {
          answer++;
        }
        sc.nextLine();
      }

      System.out.println(answer);
    }
  }
}