import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String line = scan.nextLine(); line scan.nextLine() scan.nextLine scan String[] NMC = line.split(" "); NMC line.split(" ") line.split line " " int N = Integer.parseInt(NMC[0]); N Integer.parseInt(NMC[0]) Integer.parseInt Integer NMC[0] NMC 0 int M = Integer.parseInt(NMC[1]); M Integer.parseInt(NMC[1]) Integer.parseInt Integer NMC[1] NMC 1 int C = Integer.parseInt(NMC[2]); C Integer.parseInt(NMC[2]) Integer.parseInt Integer NMC[2] NMC 2 line = scan.nextLine() line scan.nextLine() scan.nextLine scan String[] B_str = line.split(" "); B_str line.split(" ") line.split line " " int[] B = new int[M]; B new int[M] M for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            B[i] = Integer.parseInt(B_str[i]);
        } {
            B[i] = Integer.parseInt(B_str[i]);
        } B[i] = Integer.parseInt(B_str[i]) B[i] B i Integer.parseInt(B_str[i]) Integer.parseInt Integer B_str[i] B_str i int count = 0; count 0 for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        } {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        } line = scan.nextLine() line scan.nextLine() scan.nextLine scan String[] A_str = line.split(" "); A_str line.split(" ") line.split line " " int num = 0; num 0 int[] A = new int[M]; A new int[M] M for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            } {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            } A[j] = Integer.parseInt(A_str[j]) A[j] A j Integer.parseInt(A_str[j]) Integer.parseInt Integer A_str[j] A_str j num += A[j] * B[j] num A[j] * B[j] A[j] A j B[j] B j num += C num C if (num > 0) {
                count++;
            } num > 0 num 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) throws Exception {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        String line = scan.nextLine();
        String[] NMC = line.split(" ");
        int N = Integer.parseInt(NMC[0]);
        int M = Integer.parseInt(NMC[1]);
        int C = Integer.parseInt(NMC[2]);
        
        line = scan.nextLine();
        String[] B_str = line.split(" ");
        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(B_str[i]);
        }
        
        int count = 0;
        for (int i = 0; i < N; i++) {
            line = scan.nextLine();
            String[] A_str = line.split(" ");
            int num = 0;
            
            int[] A = new int[M];
            for (int j = 0; j < M; j++) {
                A[j] = Integer.parseInt(A_str[j]);
                num += A[j] * B[j];
            }
            num += C;
            if (num > 0) {
                count++;
            }
        }
        System.out.println(count);
    }
}