import java.util.*;

public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    } main {
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int[] B = new int[M]; B new int[M] M for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      } int x=0; int x=0; x 0 x<M x M x++ x++ x {
    	  B[x] = sc.nextInt();
      } {
    	  B[x] = sc.nextInt();
      } B[x] = sc.nextInt() B[x] B x sc.nextInt() sc.nextInt sc int[] A = new int[M]; A new int[M] M int total; total int count = 0; count 0 for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      } int y=0; int y=0; y 0 y<N y N y++ y++ y {
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      } {
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      } total = 0 total 0 for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	} int z=0; int z=0; z 0 z<M z M z++ z++ z {
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	} {
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	} A[z] = sc.nextInt() A[z] A z sc.nextInt() sc.nextInt sc total = total + A[z]*B[z] total total + A[z]*B[z] total A[z]*B[z] A[z] A z B[z] B z total = total + C total total + C total C if(0<total){
    		count++;
    	} 0<total 0 total {
    		count++;
    	} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    }
} public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    }
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int M = sc.nextInt();
      int C = sc.nextInt();
      int[] B = new int[M];
      for(int x=0;x<M;x++){
    	  B[x] = sc.nextInt();
      }
      int[] A = new int[M];
      int total;
      int count = 0;
      for(int y=0;y<N;y++){
    	total = 0;
    	for(int z=0;z<M;z++){
    		A[z] = sc.nextInt();
    		total = total + A[z]*B[z];
    	}
    	total = total + C;
    	if(0<total){
    		count++;
    	}
      }
      System.out.println(count);
    }
}