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

int main(){
	int N, M, C;
	int sum;
	int num = 0;
	int A[25], B[25];
	cin >> N >> M >> C;
	for(int i = 1; i <= M; i++)
	cin >> B[i];
	while(N--){
		sum = 0;
		for(int i = 1; i <= M; i++){
			cin >> A[i];
			sum += A[i]*B[i];
		}
		sum += C;
		if(sum > 0)
		num++;
	}
	cout << num;
	return 0;
}
