#include<bits/stdc++.h>
using namespace std;
int main(){
	int a[1002][8],n,k,m,r=0,j,i;
	cin>>n>>m>>k;
	for(i=0;i<n;i++){
		int h=0;
		for(j=0;j<m;j++){
			cin>>a[i][j];
			h+=a[i][j];
		}
		if(h>=k){
			r=r+1;	
		}
	}
	cout<<r<<endl;
} 
/**************************************************************
	Problem: 2026
	User: cyp
	Language: C++
	Result: Accepted
	Time:10 ms
	Memory:2072 kb
****************************************************************/