import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    } 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[][] a = new int[n][m]; a 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] = sc.nextInt();
        } int i = 0 ; int i = 0 ; i 0 i < m i m i++ i++ i {
            b[i] = sc.nextInt();
        } {
            b[i] = sc.nextInt();
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        } {
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        } for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            } int j = 0 ; int j = 0 ; j 0 j < m j m j++ j++ j {
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            } {
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            } a[i][j] = sc.nextInt() * b[j] a[i][j] a[i] a i j sc.nextInt() * b[j] sc.nextInt() sc.nextInt sc b[j] b j if(j != 0){
                    a[i][0] += a[i][j];
                } j != 0 j 0 {
                    a[i][0] += a[i][j];
                } a[i][0] += a[i][j] a[i][0] a[i] a i 0 a[i][j] a[i] a i j sc.close() sc.close sc int s = 0; s 0 for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            if(a[i][0] + c > 0){
                s++;
            }
        } {
            if(a[i][0] + c > 0){
                s++;
            }
        } if(a[i][0] + c > 0){
                s++;
            } a[i][0] + c > 0 a[i][0] + c a[i][0] a[i] a i 0 c 0 {
                s++;
            } s++ s System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[][] a = new int[n][m];
        int[] b = new int[m];
        for(int i = 0 ; i < m ; i++ ){
            b[i] = sc.nextInt();
        }
        for(int i = 0 ; i < n ; i++ ){
            for(int j = 0 ; j < m ; j++ ){
                a[i][j] = sc.nextInt() * b[j];
                if(j != 0){
                    a[i][0] += a[i][j];
                }
            }
        }
        sc.close();
        int s = 0;
        for(int i = 0 ; i < n ; i++ ){
            if(a[i][0] + c > 0){
                s++;
            }
        }
        System.out.println(s);
    }
}