import java.util.Scanner;

class Problem {
    private int N;
    private int M;
    private int C;
    private int[] B;
    private int[][] A;

    Problem() {
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        M = sc.nextInt();
        C = sc.nextInt();

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

    int solve() {
        int ans = 0;
        for (int n = 0; n < N; n++) {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        }
        return ans;
    }
}

public class Main {
    public static void main(String[] args) {
        System.out.println(new Problem().solve());
    }
} import java.util.Scanner; Scanner java.util class Problem {
    private int N;
    private int M;
    private int C;
    private int[] B;
    private int[][] A;

    Problem() {
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        M = sc.nextInt();
        C = sc.nextInt();

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

    int solve() {
        int ans = 0;
        for (int n = 0; n < N; n++) {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        }
        return ans;
    }
} Problem private int N; N private int M; M private int C; C private int[] B; B private int[][] A; A Problem() {
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        M = sc.nextInt();
        C = sc.nextInt();

        B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }
        A = new int[N][M];
        for (int n = 0; n < N; n++) {
            for (int i = 0; i < M; i++) {
                A[n][i] = sc.nextInt();
            }
        }
    } Problem {
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        M = sc.nextInt();
        C = sc.nextInt();

        B = new int[M];
        for (int i = 0; i < M; i++) {
            B[i] = sc.nextInt();
        }
        A = new int[N][M];
        for (int n = 0; n < N; n++) {
            for (int i = 0; i < M; i++) {
                A[n][i] = sc.nextInt();
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc M = sc.nextInt() M sc.nextInt() sc.nextInt sc C = sc.nextInt() C sc.nextInt() sc.nextInt sc 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 A = new int[N][M] A new int[N][M] N M for (int n = 0; n < N; n++) {
            for (int i = 0; i < M; i++) {
                A[n][i] = sc.nextInt();
            }
        } int n = 0; int n = 0; n 0 n < N n N n++ n++ n {
            for (int i = 0; i < M; i++) {
                A[n][i] = sc.nextInt();
            }
        } {
            for (int i = 0; i < M; i++) {
                A[n][i] = sc.nextInt();
            }
        } for (int i = 0; i < M; i++) {
                A[n][i] = sc.nextInt();
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                A[n][i] = sc.nextInt();
            } {
                A[n][i] = sc.nextInt();
            } A[n][i] = sc.nextInt() A[n][i] A[n] A n i sc.nextInt() sc.nextInt sc int solve() {
        int ans = 0;
        for (int n = 0; n < N; n++) {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        }
        return ans;
    } solve {
        int ans = 0;
        for (int n = 0; n < N; n++) {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        }
        return ans;
    } int ans = 0; ans 0 for (int n = 0; n < N; n++) {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        } int n = 0; int n = 0; n 0 n < N n N n++ n++ n {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        } {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        } int sum = C; sum C for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                sum += A[n][i] * B[i];
            } {
                sum += A[n][i] * B[i];
            } sum += A[n][i] * B[i] sum A[n][i] * B[i] A[n][i] A[n] A n i B[i] B i if (sum > 0) {
                ans++;
            } sum > 0 sum 0 {
                ans++;
            } ans++ ans return ans; ans public class Main {
    public static void main(String[] args) {
        System.out.println(new Problem().solve());
    }
} Main public static void main(String[] args) {
        System.out.println(new Problem().solve());
    } main {
        System.out.println(new Problem().solve());
    } System.out.println(new Problem().solve()) System.out.println System.out System System.out new Problem().solve() new Problem().solve new Problem() String[] args args public class Main {
    public static void main(String[] args) {
        System.out.println(new Problem().solve());
    }
} public class Main {
    public static void main(String[] args) {
        System.out.println(new Problem().solve());
    }
} Main
import java.util.Scanner;

class Problem {
    private int N;
    private int M;
    private int C;
    private int[] B;
    private int[][] A;

    Problem() {
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        M = sc.nextInt();
        C = sc.nextInt();

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

    int solve() {
        int ans = 0;
        for (int n = 0; n < N; n++) {
            int sum = C;
            for (int i = 0; i < M; i++) {
                sum += A[n][i] * B[i];
            }
            if (sum > 0) {
                ans++;
            }
        }
        return ans;
    }
}

public class Main {
    public static void main(String[] args) {
        System.out.println(new Problem().solve());
    }
}
