/*
CODED BY : Super_KAZAKH(-:  >---->  Yedige Ashirbek
 _____     _____         _______________                 ___        _______           ________________      _______________
/\    \   /\    \       /\              \               /\   \     /\      \         /                \    /\              \
\ \    \  \ \    \      \ \    __________\              \ \   \    \ \      \       /\     ____________\   \ \    __________\
 \ \    \  \ \    \      \ \   \_________/               \ \   \    \ \      \      \ \    \                \ \   \_________/
  \ \    \  \ \    \      \ \   \                         \ \   \    \ \      \      \ \    \                \ \   \
   \ \    \  \ \    \      \ \   \                         \ \   \    \ \      \      \ \    \                \ \   \
    \ \    \__\_\    \      \ \   \__________        _______\_\   \    \ \      \      \ \    \     ______     \ \   \__________
     \ \              \      \ \    _________\      /              \    \ \      \      \ \    \    \     \     \ \    _________\
      \ \____      ____\      \ \   \________/     /\    ________   \    \ \      \      \ \    \    \__   \     \ \   \________/
       \/___ \     \           \ \   \             \ \   \     \ \   \    \ \      \      \ \    \      \   \     \ \   \
            \ \     \           \ \   \             \ \   \     \ \   \    \ \      \      \ \    \      \   \     \ \   \
             \ \     \           \ \   \             \ \   \     \ \   \    \ \      \      \ \    \      \   \     \ \   \
              \ \     \           \ \   \___________  \ \   \     \ \   \    \ \      \      \ \    \_____/    \     \ \   \___________
               \ \     \           \ \              \  \ \   \_____\_\   \    \ \      \      \ \              /      \ \              \
                \ \_____\           \ \______________\  \ \_______________\    \ \______\      \ \____________/        \ \______________\
                 \/_____/            \/______________/   \/_______________/     \/______/       \/___________/          \/______________/
                                                                                                                                            */
#include <bits/stdc++.h>

#define pb push_back
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define ub upper_bound
#define lb lower_bound
#define bit __builtin_popcount

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

inline void boost(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

const ll maxn=2e2+123;
const ll inf=1e9+123;
const ll linf=1e18+123;
const ll mod=1e9+7;
const double eps=1e-9;
const double pi=acos(-1);
int dx[4]={0,1,-1,0};
int dy[4]={1,0,0,-1};
int a[maxn][maxn];
int main(){
    boost();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int n,m,c;
    cin>>n>>m>>c;
    for(int i=1;i<=n+1;i++){
        for(int j=1;j<=m;j++){
            cin>>a[i][j];
        }
    }
    int ans=0;
    for(int i=2;i<=n+1;i++){
        int cntr=0;
        for(int j=1;j<=m;j++){
            cntr+=a[i][j]*a[1][j];
        }
        if(cntr+c>0){
            ans++;
        }
    }
    cout<<ans;
	exit(0);
}


Measured memory_bytes: 256