import java.io.PrintWriter;
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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io 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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    }
} 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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    } 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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    } 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 int[] B = new int[M]; B new int[M] M int sum = 0; sum 0 int count = 0; count 0 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++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        } {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        } for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                sum += Integer.parseInt(sc.next()) * B[j];
            } {
                sum += Integer.parseInt(sc.next()) * B[j];
            } sum += Integer.parseInt(sc.next()) * B[j] sum Integer.parseInt(sc.next()) * B[j] Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc B[j] B j if (sum + C > 0) {
                count++;
            } sum + C > 0 sum + C sum C 0 {
                count++;
            } count++ count sum = 0 sum 0 PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.println(count) out.println out count sc.close() sc.close sc out.flush() out.flush out 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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    }
} 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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    }
} Main
import java.io.PrintWriter;
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());
        int[] B = new int[M];
        int sum = 0;
        int count = 0;

        for (int i = 0; i < M; i++) {
            B[i] = Integer.parseInt(sc.next());
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                sum += Integer.parseInt(sc.next()) * B[j];
            }
            if (sum + C > 0) {
                count++;
            }
            sum = 0;
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);
        sc.close();
        out.flush();
    }
}