import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	}
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	} main {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	} 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 int soloutions = 0; soloutions 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 for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		} {
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		} int total = 0; total 0 for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			} int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
				total = total + b[j] * sc.nextInt(); 
			} {
				total = total + b[j] * sc.nextInt(); 
			} total = total + b[j] * sc.nextInt() total total + b[j] * sc.nextInt() total b[j] * sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc total = total + C total total + C total C if(total > 0)
			{
				soloutions++;
			} total > 0 total 0 {
				soloutions++;
			} soloutions++ soloutions System.out.println(soloutions) System.out.println System.out System System.out soloutions String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	}
} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] b = new int[M];
		int soloutions = 0;
		
		for(int i = 0; i < M; i++)
		{
			b[i] = sc.nextInt();
		}
		
		for(int i = 0; i < N; i++)
		{
			int total = 0;
			for(int j = 0; j < M; j++)
			{
				total = total + b[j] * sc.nextInt(); 
			}
			total = total + C;
			if(total > 0)
			{
				soloutions++;
			}
		}
		
		System.out.println(soloutions);
		
	}
}
