import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
//map.containsKey(A)

//Map<String, Integer> map = new HashMap<String, Integer>(n);
/*for ( キーのデータ型 key : マップの名前.keySet() ) {
	データのデータ型 data = マップの名前.get( key );
	
	// keyやdataを使った処理;
}*/
//int i = Integer.parseInt(s);
//Queue<String> qq=new ArrayDeque<>(); //add,poll,peek
//Deque<String> qq=new ArrayDeque<>();//push,pop,peek
//ArrayList<String> cc = new ArrayList<>(n);
//Collections.sort(list);
//Array.sort(list);
//Arrays.asList(c).contains("a")
//list.set(1,"walk");
public class Main {
	static int a1[]= {0,-1,0,1};
	static int b1[]= {-1,0,1,0};
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static int K;
	public static void main(String[] args) {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	}
} import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util public class Main {
	static int a1[]= {0,-1,0,1};
	static int b1[]= {-1,0,1,0};
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static int K;
	public static void main(String[] args) {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	}
} Main static int a1[]= {0,-1,0,1}; a1 {0,-1,0,1} 0 -1 1 0 1 static int b1[]= {-1,0,1,0}; b1 {-1,0,1,0} -1 1 0 1 0 private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static int K; K static void p(String ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans String ans ans static void p(int ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans int ans ans static void p(long ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans long ans ans static void p(double ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans double ans ans public static void main(String[] args) {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	} main {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	} 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 int ctn=0; ctn 0 for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			B[i]=sc.nextInt();
		} {
			B[i]=sc.nextInt();
		} B[i]=sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc int Ai[][]=new int[N][M]; Ai new int[N][M] N M for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		} int a=0; int a=0; a 0 a<N a N a++ a++ a {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		} {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		} int ans=0; ans 0 for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			} int b=0; int b=0; b 0 b<M b M b++ b++ b {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			} {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			} Ai[a][b]=sc.nextInt() Ai[a][b] Ai[a] Ai a b sc.nextInt() sc.nextInt sc ans+=Ai[a][b]*B[b] ans Ai[a][b]*B[b] Ai[a][b] Ai[a] Ai a b B[b] B b if(ans+C>0) {
				ctn++;
			} ans+C>0 ans+C ans C 0 {
				ctn++;
			} ctn++ ctn p(ctn) p ctn String[] args args public class Main {
	static int a1[]= {0,-1,0,1};
	static int b1[]= {-1,0,1,0};
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static int K;
	public static void main(String[] args) {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	}
} public class Main {
	static int a1[]= {0,-1,0,1};
	static int b1[]= {-1,0,1,0};
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static int K;
	public static void main(String[] args) {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	}
} Main
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
//map.containsKey(A)

//Map<String, Integer> map = new HashMap<String, Integer>(n);
/*for ( キーのデータ型 key : マップの名前.keySet() ) {
	データのデータ型 data = マップの名前.get( key );
	
	// keyやdataを使った処理;
}*/
//int i = Integer.parseInt(s);
//Queue<String> qq=new ArrayDeque<>(); //add,poll,peek
//Deque<String> qq=new ArrayDeque<>();//push,pop,peek
//ArrayList<String> cc = new ArrayList<>(n);
//Collections.sort(list);
//Array.sort(list);
//Arrays.asList(c).contains("a")
//list.set(1,"walk");
public class Main {
	static int a1[]= {0,-1,0,1};
	static int b1[]= {-1,0,1,0};
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static int K;
	public static void main(String[] args) {
		int N=sc.nextInt();
		int M=sc.nextInt();
		int C=sc.nextInt();
		int B[]=new int[M];
		int ctn=0;
		for(int i=0;i<M;i++) {
			B[i]=sc.nextInt();
		}
		int Ai[][]=new int[N][M];
		for(int a=0;a<N;a++) {
			int ans=0;
			for(int b=0;b<M;b++) {
				Ai[a][b]=sc.nextInt();
				ans+=Ai[a][b]*B[b];
			}
			if(ans+C>0) {
				ctn++;
			}
		}
		p(ctn);
	}
}
