"use strict";

function Main(input) {
    input = input.split("\n");

    input[0] = input[0].split(" ");
    const n = parseInt(input[0][0], 10);
    const m = parseInt(input[0][1], 10);
    const c = parseInt(input[0][2], 10);
    const b = input[1].split(" ");

    let answer = 0;
    for (let i = 0; i < n; i++) {
        let code = input[2 + i].split(" ");
        let codeScore = c;

        for (let j = 0; j < m; j++) {
            codeScore += parseInt(b[j], 10) * parseInt(code[j], 10)
        }

        if (codeScore > 0) {
            answer++;
        }
    }

    console.log(answer);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
