import 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];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

        System.out.println(result);
        sc.close();
    }
} import java.util.*; util.* java 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];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

        System.out.println(result);
        sc.close();
    }
} 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];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

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

        int[] b = new int[M];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

        System.out.println(result);
        sc.close();
    } 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 int[] a = new int[M]; a 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 result = 0; result 0 for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        } int i =0; int i =0; i 0 i<N i N i++ i++ i {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        } {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        } int temp = 0; temp 0 for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            } int j =0; int j =0; j 0 j<M j M j++ j++ j {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            } {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            } a[j] = sc.nextInt() a[j] a j sc.nextInt() sc.nextInt sc temp += a[j] * b[j] temp a[j] * b[j] a[j] a j b[j] b j if (temp + C > 0) {
                result ++;
            } temp + C > 0 temp + C temp C 0 {
                result ++;
            } result ++ result System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc 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];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

        System.out.println(result);
        sc.close();
    }
} 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];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

        System.out.println(result);
        sc.close();
    }
} Main
import 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];
        int[] a = new int[M];

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

        int result = 0;
        for (int i =0; i<N; i++) {
            int temp = 0;

            for (int j =0; j<M; j++) {
                a[j] = sc.nextInt();
                temp += a[j] * b[j];
            }
            if (temp + C > 0) {
                result ++;
            }
        }

        System.out.println(result);
        sc.close();
    }
}