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 b[] = new int[m];
        int suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    }
} 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 b[] = new int[m];
        int suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    }
} 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 b[] = new int[m];
        int suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    } 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 suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    } 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 int suc = 0; suc 0 int anm = 0; anm 0 int ab = 0; ab 0 int sum = 0; sum 0 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++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        } {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        } sum = 0 sum 0 anm = 0 anm 0 ab = 0 ab 0 for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            } {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            } anm = sc.nextInt() anm sc.nextInt() sc.nextInt sc ab = anm * b[j] ab anm * b[j] anm b[j] b j sum = sum + ab sum sum + ab sum ab if (sum + c > 0) {
                suc++;
            } sum + c > 0 sum + c sum c 0 {
                suc++;
            } suc++ suc System.out.println(suc) System.out.println System.out System System.out suc sc.close() sc.close sc 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 b[] = new int[m];
        int suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    }
} 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 b[] = new int[m];
        int suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    }
} 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 b[] = new int[m];
        int suc = 0;
        int anm = 0;
        int ab = 0;
        int sum = 0;

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

        for (int i = 0; i < n; i++) {
            sum = 0;
            anm = 0;
            ab = 0;
            for (int j = 0; j < m; j++) {
                anm = sc.nextInt();
                ab = anm * b[j];
                sum = sum + ab;
            }

            if (sum + c > 0) {
                suc++;
            }

        }

        System.out.println(suc);

        sc.close();
    }
}
