import std.conv, std.stdio;
import std.algorithm, std.array, std.range, std.string;
import std.numeric;
void main()
{
    auto
        buf = readln.chomp.split.to!(int[]),
        b = readln.chomp.split.to!(int[]);
    size_t answer;
    foreach (i; 0..buf[0])
        if (-buf[2] < readln.chomp.split.to!(int[]).dotProduct(b))
            answer += 1;
    answer.writeln;
}
