import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    }

} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    } 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 = 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 int sum = 0; sum 0 int cnt = 0; cnt 0 for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        } {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        } sum = 0 sum 0 for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                int num = sc.nextInt();
                sum += num * b[j];
            } {
                int num = sc.nextInt();
                sum += num * b[j];
            } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc sum += num * b[j] sum num * b[j] num b[j] b j sum += c sum c if (sum > 0) {
                cnt++;
            } sum > 0 sum 0 {
                cnt++;
            } cnt++ cnt sc.close() sc.close sc System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    }

} public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        //        int[][] a = new int[n][m];

        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            sum = 0;
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                sum += num * b[j];
            }
            sum += c;
            if (sum > 0) {
                cnt++;
            }
        }

        sc.close();

        System.out.println(cnt);
    }

}