#include <bits/stdc++.h>
using namespace std;

int n, m, c, b[20], ans=0;

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

	for(int i=0, total; i<n; i++){
		total = 0;
		for(int j=0, a; j<m; j++){
			cin >> a;
			total += a*b[j];
		}

		total += c;
		ans += total>0? 1:0;
	}

	cout << ans << endl;
}