let readString() = stdin.ReadLine()
let readStringArray() = stdin.ReadLine().Split(' ');
let readInt() = readString() |> int
let readIntArray() = readStringArray() |> Array.map(fun x -> int x)
let char2String(value) = List.ofSeq value |> List.toArray |> System.String

let n, m, c = readIntArray() |> fun x -> (x.[0], x.[1], x.[2])
let b = readIntArray();
let a = [for i in [1..n] -> readIntArray()]

let mul a1 a2 = Array.map2 (fun x y -> x * y) a1 a2 |> Array.sum

let rec solve list = 
    match list with
    | h::t -> if (mul h b) + c > 0 then (solve t) + 1 else solve t
    | _ -> 0

solve a
|> printfn "%d"