Олимпиадный тренинг

Задача 39382. Will you solve it?


There are N parts of some source code. The characteristics of the ith part of the code are represented by M integers Ai1, Ai2< /sub>, ..., AiM . You are given integers B1, B2, ...< /font>, BM , and C.
The ith part of the code solves the problem correctly if and only if \( A_{i1}\cdot B_1 + A_{i2} \cdot B_2 + ...+ A_{iM}\cdot B_M +C>0\).
Among the N parts of the source code, find the number that correctly solve this problem.

Input
The first line contains three space-separated numbers: N, M (1 <= N, M <= 20) and C (- 100 <= C <= 100). The second line contains   M numbers Bi (-100 <= B<= 100). Each of the following N lines contains numbers Ai (-100 <= A ij <= 100, 1 <= i <= N, 1 <= j <= M).

Imprint
Print one number - the answer to the problem.
 
Examples
# Input Output
1 2 3 -10
1 2 3
3 2 1
1 2 2
1
2 5 2 -4
-2 5
100 41
100 40
-3 0
-6 -2
18-13
2
3 3 3 0
100 -100 0
0 100 100
100 100 100
-100 100 100
0