import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author teiwa
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskB solver = new TaskB(); solver new TaskB() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        }

    } TaskB public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        } solve {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int M = in.nextInt(); M in.nextInt() in.nextInt in int C = in.nextInt(); C in.nextInt() in.nextInt in int B[] = new int[M]; B new int[M] M for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                B[i] = in.nextInt();
            } {
                B[i] = in.nextInt();
            } B[i] = in.nextInt() B[i] B i in.nextInt() in.nextInt in int[][] A = new int[N][M]; A new int[N][M] N M for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            } {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            } for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                    A[i][j] = in.nextInt();
                } {
                    A[i][j] = in.nextInt();
                } A[i][j] = in.nextInt() A[i][j] A[i] A i j in.nextInt() in.nextInt in int counter = 0; counter 0 for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            } {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            } int point = 0; point 0 for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                    point += A[i][j] * B[j];
                } {
                    point += A[i][j] * B[j];
                } point += A[i][j] * B[j] point A[i][j] * B[j] A[i][j] A[i] A i j B[j] B j if (point + C > 0) {
                    counter++;
                } point + C > 0 point + C point C 0 {
                    counter++;
                } counter++ counter out.println(counter) out.println out counter int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author teiwa
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            int C = in.nextInt();
            int B[] = new int[M];
            for (int i = 0; i < M; i++) {
                B[i] = in.nextInt();
            }
            int[][] A = new int[N][M];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    A[i][j] = in.nextInt();
                }
            }

            int counter = 0;
            for (int i = 0; i < N; i++) {
                int point = 0;
                for (int j = 0; j < M; j++) {
                    point += A[i][j] * B[j];
                }
                if (point + C > 0) {
                    counter++;
                }
            }
            out.println(counter);
        }

    }
}

