import java.util.Scanner;
public class Main{
	
	public static void main (String[] args) {
		
		Main main = new Main();
		main.solve();
	}
	
	private void solve() {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main (String[] args) {
		
		Main main = new Main();
		main.solve();
	}
	
	private void solve() {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	}
} Main public static void main (String[] args) {
		
		Main main = new Main();
		main.solve();
	} main {
		
		Main main = new Main();
		main.solve();
	} Main main = new Main(); main new Main() main.solve() main.solve main String[] args args private void solve() {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	} solve {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	} Scanner scanner = new Scanner (System.in); scanner new Scanner (System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner int C = scanner.nextInt(); C scanner.nextInt() scanner.nextInt scanner int[] list = new int [M]; list new int [M] M for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		} int index=0; int index=0; index 0 index<M index M index++ index++ index {
			list[index]=scanner.nextInt();
		} {
			list[index]=scanner.nextInt();
		} list[index]=scanner.nextInt() list[index] list index scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		} int index=0; int index=0; index 0 index<N index N index++ index++ index {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		} {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		} int sum = 0; sum 0 for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			} int index2=0; int index2=0; index2 0 index2<M index2 M index2++ index2++ index2 {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			} {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			} int number = scanner.nextInt(); number scanner.nextInt() scanner.nextInt scanner sum+=(number*list[index2]) sum (number*list[index2]) number list[index2] list index2 sum+=C sum C if (sum>0) {
				count++;
			} sum>0 sum 0 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count public class Main{
	
	public static void main (String[] args) {
		
		Main main = new Main();
		main.solve();
	}
	
	private void solve() {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	}
} public class Main{
	
	public static void main (String[] args) {
		
		Main main = new Main();
		main.solve();
	}
	
	private void solve() {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	}
} Main
import java.util.Scanner;
public class Main{
	
	public static void main (String[] args) {
		
		Main main = new Main();
		main.solve();
	}
	
	private void solve() {
		
		Scanner scanner = new Scanner (System.in);
		
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int C = scanner.nextInt();
		
		int[] list = new int [M];
		
		for (int index=0; index<M; index++) {
			list[index]=scanner.nextInt();
		}
		
		int count = 0;
		
		for (int index=0; index<N; index++) {
			int sum = 0;
			for (int index2=0; index2<M; index2++) {
				int number = scanner.nextInt();
				sum+=(number*list[index2]);
			}
			
			sum+=C;
			
			if (sum>0) {
				count++;
			}
			
		}
		
		System.out.println(count);
	}
}