function main(input) {
    const args = input.split('\n');
    var one = args[0].split(' ');
    var Bs = args[1].split(' ');

    var N = parseInt(one[0], 10);
    var M = parseInt(one[1], 10);
    var C = parseInt(one[2], 10);

    var B = 0;
    var ans = [];
    var ans_count = 0;

    for(var i = 0; i < N; i++) {
        As = args[i + 2].split(' ');
        ans[i] = 0;
        for (var j = 0; j < M; j++) {
            B = parseInt(Bs[j], 10);
            A = parseInt(As[j], 10);
            ans[i] += A * B;
        }
    }

    for(var i = 0; i < N; i++) {
        ans[i] += C;
        if(ans[i] > 0) {
            ans_count ++;
        }
    }

    console.log(ans_count);


}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

