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

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

A = [0]*N

for i in range(N):

    A[i] = list(map(int,input().split()))

cnt = 0

for j in range(N):

    sum = 0

    for k in range(M):

        sum += A[j][k]*B[k]

    if sum+C > 0:

        cnt += 1

        

print(cnt)
# coding: utf-8



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

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

ans = 0



for i in range(n):

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

    tmp = 0

    for j in range(m):

        tmp += A[j]*B[j]

    tmp += c

    if tmp > 0:

        ans += 1



print(ans)
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = [0] * N
for i in range(N):
    A[i] = list(map(int, input().split()))
cnt = 0
for j in range(N):
    sum = 0
    for k in range(M):
        sum += A[j][k] * B[k]
    if sum + C > 0:
        cnt += 1
print(cnt)

# coding: utf-8
n, m, c = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
for i in range(n):
    A = list(map(int, input().split()))
    tmp = 0
    for j in range(m):
        tmp += A[j] * B[j]
    tmp += c
    if tmp > 0:
        ans += 1
print(ans)

-N, M, C = list(map(int, input().split())) +# coding: utf-8 +n, m, c = list(map(int, input().split())) -A = [0] * N -for i in range(N): -    A[i] = list(map(int, input().split())) -cnt = 0 -for j in range(N): -    sum = 0 -    for k in range(M): -        sum += A[j][k] * B[k] -    if sum + C > 0: -        cnt += 1 -print(cnt) +ans = 0 +for i in range(n): +    A = list(map(int, input().split())) +    tmp = 0 +    for j in range(m): +        tmp += A[j] * B[j] +    tmp += c +    if tmp > 0: +        ans += 1 +print(ans)