import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

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

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        int C = scan.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = scan.nextInt();
        }
        int answer = 0;
        for (int i = 0; i < N; i++) {
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = scan.nextInt();
            }
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += A[j]*B[j];
            }
            sum += C;
            if (sum > 0) {
                answer += 1;
            }
        }
        System.out.println(answer);
    }
}
