import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    } main {
        try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    } try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        } {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        } Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) 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[][] feature = new int[N][M]; feature new int[N][M] N M 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] = scanner.nextInt() B[i] B i scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            } {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            } for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                    feature[i][j] = scanner.nextInt();
                } {
                    feature[i][j] = scanner.nextInt();
                } feature[i][j] = scanner.nextInt() feature[i][j] feature[i] feature i j scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            } {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            } long sum = C; sum C for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                    sum += feature[i][j] * B[j];
                } {
                    sum += feature[i][j] * B[j];
                } sum += feature[i][j] * B[j] sum feature[i][j] * B[j] feature[i][j] feature[i] feature i j B[j] B j if (sum > 0) {
                    count++;
                } sum > 0 sum 0 {
                    count++;
                } 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) {
        try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in)) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int C = scanner.nextInt();
            int[][] feature = new int[N][M];
            int[] B = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = scanner.nextInt();
            }
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    feature[i][j] = scanner.nextInt();
                }
            }
            int count = 0;
            for (int i = 0; i < N; i++) {
                long sum = C;
                for (int j = 0; j < M; j++) {
                    sum += feature[i][j] * B[j];
                }
                if (sum > 0) {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
} Main
import java.util.Scanner;

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