#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"I=lambda:map(int,input().split());n,m,c=I();*b,=I();print(eval('+(-c<sum(x*y for x,y in zip(I(),b)))'*n))\n"
"\"";
  system(s);
  return 0;
}            