#!/usr/bin/env python3

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



from itertools import chain

from functools import reduce

from collections import OrderedDict, Counter, deque

import operator



import numpy as np



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

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

ans = 0

for _ in range(N):

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

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

        ans += 1

print(ans)
#!/usr/bin/env python3

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



import numpy as np



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

B = np.array([int(x) for x in input().split()])

A = np.array([

        [int(x) for x in input().split()]

        for _ in range(N)])



print((((A.dot(B) + C) > 0).sum()))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from itertools import chain
from functools import reduce
from collections import OrderedDict, Counter, deque
import operator
import numpy as np

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

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np

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

-from itertools import chain -from functools import reduce -from collections import OrderedDict, Counter, deque -import operator -B = np.array(list(map(int, input().split()))) -ans = 0 -for _ in range(N): -    A = np.array(list(map(int, input().split()))) -    if sum(A * B) + C > 0: -        ans += 1 -print(ans) +B = np.array([int(x) for x in input().split()]) +A = np.array([[int(x) for x in input().split()] for _ in range(N)]) +print((((A.dot(B) + C) > 0).sum()))