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