# -*- coding: utf-8 -*-

import numpy as np

def inpl(): return list(map(int, input().split()))



N, M, C = inpl()

B = np.array(inpl(), dtype=np.int64).reshape(1, -1)

A = np.zeros((N, M), dtype=np.int64)



for i in range(N):

    A[i] = inpl()



print((((A*B).sum(axis=1) + C >0).sum()))
# -*- coding: utf-8 -*-

import numpy as np

def inpl(): return list(map(int, input().split()))

N, M, C = inpl()

B = np.array(inpl(), dtype=np.int64)

ans = 0

for _ in range(N):

    A = np.array(inpl(), dtype=np.int64)

    ans += np.sum(A*B)+C > 0

print(ans)

# -*- coding: utf-8 -*-
import numpy as np


def inpl():
    return list(map(int, input().split()))


N, M, C = inpl()
B = np.array(inpl(), dtype=np.int64).reshape(1, -1)
A = np.zeros((N, M), dtype=np.int64)
for i in range(N):
    A[i] = inpl()
print((((A * B).sum(axis=1) + C > 0).sum()))

# -*- coding: utf-8 -*-
import numpy as np


def inpl():
    return list(map(int, input().split()))


N, M, C = inpl()
B = np.array(inpl(), dtype=np.int64)
ans = 0
for _ in range(N):
    A = np.array(inpl(), dtype=np.int64)
    ans += np.sum(A * B) + C > 0
print(ans)

-B = np.array(inpl(), dtype=np.int64).reshape(1, -1) -A = np.zeros((N, M), dtype=np.int64) -for i in range(N): -    A[i] = inpl() -print((((A * B).sum(axis=1) + C > 0).sum())) +B = np.array(inpl(), dtype=np.int64) +ans = 0 +for _ in range(N): +    A = np.array(inpl(), dtype=np.int64) +    ans += np.sum(A * B) + C > 0 +print(ans)