#include <iostream>
using namespace std;

int main() {
	int n, m, c, d=0, count=0;
	int a[20], b[20];

	cin >> n >> m >> c;

	for (int i = 0; i < m; i++) {
		cin >> b[i];
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			cin >> a[j];
			d += a[j] * b[j];
		}
		if (d + c > 0) count++;
		d = 0;
	}
	
	cout << count << endl;
}