import numpy as np

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

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



ans = 0



for i in range(N):

    tmp = np.dot(np.array(list(map(int, input().split()))), B)

    if (tmp.sum() + C) > 0:

        ans += 1



print(ans)
import numpy as np



n, m, c = list(map(int, input().split()))

b = np.array(list(map(int, input().split())))

arr = np.array([list(map(int, input().split())) for _ in range(n)])



result = (arr * b).sum(axis=1) + c

print((np.where(result > 0)[0].shape[0]))
import numpy as np

N, M, C = list(map(int, input().split()))
B = np.array(list(map(int, input().split())))
ans = 0
for i in range(N):
    tmp = np.dot(np.array(list(map(int, input().split()))), B)
    if (tmp.sum() + C) > 0:
        ans += 1
print(ans)

import numpy as np

n, m, c = list(map(int, input().split()))
b = np.array(list(map(int, input().split())))
arr = np.array([list(map(int, input().split())) for _ in range(n)])
result = (arr * b).sum(axis=1) + c
print((np.where(result > 0)[0].shape[0]))

-N, M, C = list(map(int, input().split())) -B = np.array(list(map(int, input().split()))) -ans = 0 -for i in range(N): -    tmp = np.dot(np.array(list(map(int, input().split()))), B) -    if (tmp.sum() + C) > 0: -        ans += 1 -print(ans) +n, m, c = list(map(int, input().split())) +b = np.array(list(map(int, input().split()))) +arr = np.array([list(map(int, input().split())) for _ in range(n)]) +result = (arr * b).sum(axis=1) + c +print((np.where(result > 0)[0].shape[0]))