import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    }

    
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    }

    
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    } main {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    } Scanner scan = new Scanner(System.in); scan new Scanner(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 count = 0; count 0 int[][] A = new int[N][M]; A new int[N][M] N M for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        } int row = 0; int row = 0; row 0 row < N row N row++ row++ row {
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        } {
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        } for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            } int col = 0; int col = 0; col 0 col < M col M col++ col++ col {
                A[row][col] = scan.nextInt();
            } {
                A[row][col] = scan.nextInt();
            } A[row][col] = scan.nextInt() A[row][col] A[row] A row col scan.nextInt() scan.nextInt scan int sum = 0; sum 0 for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                sum += A[row][i] * B[i];
            } {
                sum += A[row][i] * B[i];
            } sum += A[row][i] * B[i] sum A[row][i] * B[i] A[row][i] A[row] A row i B[i] B i sum += C sum C if(sum > 0){
                count++;
            } sum > 0 sum 0 {
                count++;
            } count++ count System.out.print(count + "\n") System.out.print System.out System System.out count + "\n" count "\n" String[] args args public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    }

    
} public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    }

    
} Main
import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(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 count = 0;
        int[][] A = new int[N][M];
        for(int row = 0; row < N; row++){
            for(int col = 0; col < M; col++){
                A[row][col] = scan.nextInt();
            }

            int sum = 0;
            for(int i = 0; i < M; i++){
                sum += A[row][i] * B[i];
            }
            sum += C;

            if(sum > 0){
                count++;
            }
        }

        System.out.print(count + "\n");
    }

    
}