import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int m = stdIn.nextInt(); m stdIn.nextInt() stdIn.nextInt stdIn int c = stdIn.nextInt(); c stdIn.nextInt() stdIn.nextInt stdIn int[] b = new int[m]; b new int[m] m for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			b[i] = stdIn.nextInt();
		} {
			b[i] = stdIn.nextInt();
		} b[i] = stdIn.nextInt() b[i] b i stdIn.nextInt() stdIn.nextInt stdIn int ans = 0; ans 0 for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i <n i n i++ i++ i {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		} {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		} int[] a = new int[m]; a new int[m] m int cnt = 0; cnt 0 for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			} {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			} a[j] = stdIn.nextInt() a[j] a j stdIn.nextInt() stdIn.nextInt stdIn cnt += a[j]*b[j] cnt a[j]*b[j] a[j] a j b[j] b j if(cnt+c>0) {
				ans++;
			} cnt+c>0 cnt+c cnt c 0 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt(); 
		int m = stdIn.nextInt();
		int c = stdIn.nextInt();
		
		int[] b = new int[m];
		
		for(int i = 0; i < m; i++) {
			b[i] = stdIn.nextInt();
		}
		
		int ans = 0;
		
		for(int i = 0; i <n; i++) {
			int[] a = new int[m];
			int cnt = 0;
			for(int j = 0; j < m; j++) {
				a[j] = stdIn.nextInt();
				cnt += a[j]*b[j];
			}
			if(cnt+c>0) {
				ans++;
			}
		}
		System.out.println(ans);
		
		
	}

}
