import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    } main {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc 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 int[] B_array = new int[M]; B_array new int[M] M for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            B_array[i] = sc.nextInt();
        } {
            B_array[i] = sc.nextInt();
        } B_array[i] = sc.nextInt() B_array[i] B_array i sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        } {
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        } int total = C; total C for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            } {
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            } int Aij = sc.nextInt(); Aij sc.nextInt() sc.nextInt sc total += Aij * B_array[j] total Aij * B_array[j] Aij B_array[j] B_array j if(total > 0){
                ans++;
            } total > 0 total 0 {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();
        
        int[] B_array = new int[M];
        for(int i = 0; i < M; i++){
            B_array[i] = sc.nextInt();
        }
        
        int ans = 0;
        for(int i = 0; i < N; i++){
            int total = C;
            for(int j = 0; j < M; j++){
                int Aij = sc.nextInt();
                total += Aij * B_array[j];
            }
            if(total > 0){
                ans++;
            }
        }
        
        System.out.println(ans);
    }
}