import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans = 0; ans 0 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 int b[] = new int[M]; b new int[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 for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            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++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        } {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        } int sum = 0; sum 0 for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            } {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            } int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sum += a * b[j] sum a * b[j] a b[j] b j sum += C sum C if (sum > 0) {
                ++ans;
            } sum > 0 sum 0 {
                ++ans;
            } ++ans ans sc.close() sc.close sc System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans = 0;
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int b[] = new int[M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                int a = Integer.parseInt(sc.next());
                sum += a * b[j];
            }
            sum += C;
            if (sum > 0) {
                ++ans;
            }
        }
        sc.close();
        System.out.println(ans);
    }
}