import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

        System.out.println(counter);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

        System.out.println(counter);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

        System.out.println(counter);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

        System.out.println(counter);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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[] B = new int[M]; B new int[M] M for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            B[i] = sc.nextInt();
        } {
            B[i] = sc.nextInt();
        } B[i] = sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc int counter = 0; counter 0 for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        } {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        } int judge = 0; judge 0 for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                judge += sc.nextInt() * B[j];
            } {
                judge += sc.nextInt() * B[j];
            } judge += sc.nextInt() * B[j] judge sc.nextInt() * B[j] sc.nextInt() sc.nextInt sc B[j] B j if (judge + C > 0)
                counter++; judge + C > 0 judge + C judge C 0 counter++ counter System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

        System.out.println(counter);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int C = sc.nextInt();

        int[] B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }

        int counter = 0;
        for (int i = 0; i < N; i++) {
            int judge = 0;
            for (int j = 0; j < M; j++) {
                judge += sc.nextInt() * B[j];
            }

            if (judge + C > 0)
                counter++;
        }

        System.out.println(counter);
    }
}