import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    } main {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Integer[] b = new Integer[m]; b new Integer[m] m for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            b[i] = Integer.parseInt(sc.next());
        } {
            b[i] = Integer.parseInt(sc.next());
        } b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc ArrayList<Integer[]> aList = new ArrayList<>(); aList new ArrayList<>() for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        } {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        } Integer[] a = new Integer[m]; a new Integer[m] m for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                a[j] = Integer.parseInt(sc.next());
            } {
                a[j] = Integer.parseInt(sc.next());
            } a[j] = Integer.parseInt(sc.next()) a[j] a j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc aList.add(a) aList.add aList a int result = 0; result 0 for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        } {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        } int sum = 0; sum 0 for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                sum += aList.get(i)[j] * b[j];
            } {
                sum += aList.get(i)[j] * b[j];
            } sum += aList.get(i)[j] * b[j] sum aList.get(i)[j] * b[j] aList.get(i)[j] aList.get(i) aList.get aList i j b[j] b j if (sum + c > 0) {
                result++;
            } sum + c > 0 sum + c sum c 0 {
                result++;
            } result++ result System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        Integer[] b = new Integer[m];
        for (int i = 0; i < m; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        ArrayList<Integer[]> aList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            Integer[] a = new Integer[m];
            for (int j = 0; j < m; j++) {
                a[j] = Integer.parseInt(sc.next());
            }
            aList.add(a);
        }

        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += aList.get(i)[j] * b[j];
            }
            if (sum + c > 0) {
                result++;
            }
        }

        System.out.println(result);
    }
}