#include<bits/stdc++.h>
using namespace std;
int main(){
int a[300][300],n,m,k,h,s=0;
cin>>n>>m>>k;
    for(int i=0;i<n;i++){
    	h=0;
 	    for(int j=0;j<m;j++){
		 cin>>a[i][j];
		 h=h+a[i][j];
	    }
	    if(h>=k){
	    	s++;
	    }
    }
    cout<<s;
    
		return 0;
}

		



/**************************************************************
	Problem: 2026
	User: lihean
	Language: C++
	Result: Accepted
	Time:6 ms
	Memory:2300 kb
****************************************************************/