import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    } try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        } {
            new Main().solve(sc);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) new Main().solve(sc) new Main().solve new Main() sc String[] args args void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    } solve {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    } 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[] bs = new int[m]; bs new int[m] m for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            bs[i] = sc.nextInt();
        } {
            bs[i] = sc.nextInt();
        } bs[i] = sc.nextInt() bs[i] bs i sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        } {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        } int tmp = c; tmp c for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            } {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc tmp += bs[j] * a tmp bs[j] * a bs[j] bs j a if (tmp > 0) {
                ans++;
            } tmp > 0 tmp 0 {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans Scanner sc sc public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

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

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();
        int[] bs = new int[m];
        for (int i = 0; i < m; i++) {
            bs[i] = sc.nextInt();
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int tmp = c;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
                tmp += bs[j] * a;
            }

            if (tmp > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
}
