import numpy as np

N,M,C = list(map(int,input().split()))

B = np.array(input().split(),dtype=np.int)

A = np.array([input().split() for _ in range(N)],dtype=np.int)

answer = (((A*B).sum(axis=1)+C)>0).sum()

print(answer)

N,M,C = list(map(int,input().split()))

B = list(map(int,input().split()))

a = 0



for n in range(N):

  A = list(map(int,input().split()))

  if 0<sum([a*b for a,b in zip(A,B)])+C:

    a+=1



print(a)
import numpy as np

N, M, C = list(map(int, input().split()))
B = np.array(input().split(), dtype=np.int)
A = np.array([input().split() for _ in range(N)], dtype=np.int)
answer = (((A * B).sum(axis=1) + C) > 0).sum()
print(answer)

N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
a = 0
for n in range(N):
    A = list(map(int, input().split()))
    if 0 < sum([a * b for a, b in zip(A, B)]) + C:
        a += 1
print(a)

-import numpy as np - -B = np.array(input().split(), dtype=np.int) -A = np.array([input().split() for _ in range(N)], dtype=np.int) -answer = (((A * B).sum(axis=1) + C) > 0).sum() -print(answer) +B = list(map(int, input().split())) +a = 0 +for n in range(N): +    A = list(map(int, input().split())) +    if 0 < sum([a * b for a, b in zip(A, B)]) + C: +        a += 1 +print(a)