#include<iostream>
using namespace std;
int main(){
	int a, b, c, x[20][20], y[20], z[20] = { 0 },p=0;
	cin >> a >> b >> c;
	for (int i = 0; i < b; i++) {
		cin >> y[i];
	}
	for (int j = 0; j < a; j++) {
		for (int i = 0; i < b; i++) {
			cin >> x[j][i];
			z[j] += x[j][i] * y[i];
		}
		if (z[j]+c > 0)p++;
	}
	cout << p << endl;
	return 0;

}