import numpy as np

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

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

cnt = 0

for _ in range(N):

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

    if sum(A * B) + C > 0:

        cnt += 1

print(cnt)
import sys

readline = sys.stdin.readline



def main():

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

    B = list(map(int, readline().rstrip().split()))

    ans = 0

    for _ in range(N):

        A = list(map(int, readline().rstrip().split()))

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

            ans += 1

    

    print(ans)





if __name__ == '__main__':

    main()
import numpy as np

N, M, C = list(map(int, input().split()))
B = np.array(list(map(int, input().split())))
cnt = 0
for _ in range(N):
    A = np.array(list(map(int, input().split())))
    if sum(A * B) + C > 0:
        cnt += 1
print(cnt)

import sys

readline = sys.stdin.readline


def main():
    N, M, C = list(map(int, readline().rstrip().split()))
    B = list(map(int, readline().rstrip().split()))
    ans = 0
    for _ in range(N):
        A = list(map(int, readline().rstrip().split()))
        if sum([a * b for a, b in zip(A, B)]) + C > 0:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

-import numpy as np +import sys -N, M, C = list(map(int, input().split())) -B = np.array(list(map(int, input().split()))) -cnt = 0 -for _ in range(N): -    A = np.array(list(map(int, input().split()))) -    if sum(A * B) + C > 0: -        cnt += 1 -print(cnt) +readline = sys.stdin.readline + + +def main(): +    N, M, C = list(map(int, readline().rstrip().split())) +    B = list(map(int, readline().rstrip().split())) +    ans = 0 +    for _ in range(N): +        A = list(map(int, readline().rstrip().split())) +        if sum([a * b for a, b in zip(A, B)]) + C > 0: +            ans += 1 +    print(ans) + + +if __name__ == "__main__": +    main()