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

int main(){
	int N, M, C;
	int r=0;
	cin >> N>> M>>C;
	int m= M;

	vector<int> B;
	
	while (M--){
		int b;
		cin>>b;
		B.push_back(b);
	}	
	while (N--){
		int sum=0;
		for (int i=0; i<m; ++i){
			int a;
			cin >>a;
			sum += a*B[i];}
		if (sum > C*-1)
			++r;
	}
	cout << r<< '\n'; 
}