let n, m, c = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let bs = Array.init m @@ fun _ -> Scanf.scanf " %d" (+) 0
let a_ss = Array.init n @@ fun _ -> Array.init m @@ fun i -> Scanf.scanf " %d" @@ fun a -> a * bs.(i)
let _ = Array.fold_left (fun s a_s -> s + if Array.fold_left (+) c a_s > 0 then 1 else 0) 0 a_ss |> Printf.printf "%d\n"