import java.util.*;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    } main {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    } 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[][] values = new int[N][M]; values new int[N][M] N M for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                values[i][j] = sc.nextInt();
            } {
                values[i][j] = sc.nextInt();
            } values[i][j] = sc.nextInt() values[i][j] values[i] values i j sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 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++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        } {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        } int sum = 0; sum 0 for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                sum += values[i][j] * b[j];
            } {
                sum += values[i][j] * b[j];
            } sum += values[i][j] * b[j] sum values[i][j] * b[j] values[i][j] values[i] values i j b[j] b j if (sum + C > 0) {
                ans++;
            } sum + C > 0 sum + C sum C 0 {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        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[][] values = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                values[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = 0;
            for (int j = 0; j < M; j++) {
                sum += values[i][j] * b[j];
            }
            if (sum + C > 0) {
                ans++;
            }
        }

        System.out.println(ans);
    }
}
