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 i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	}
} 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 i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	}
} 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 i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	} 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 i i j; j int[] b = new int[m]; b new int[m] m for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		} i = 0; 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 total; total int cnt = 0; cnt 0 for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		} i = 0; i = 0 i 0 i < n i n i++ i++ i {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		} {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		} total = 0 total 0 for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			} j = 0; j = 0 j 0 j < m j m j++ j++ j {
				total += b[j]*sc.nextInt();
			} {
				total += b[j]*sc.nextInt();
			} total += b[j]*sc.nextInt() total b[j]*sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc total += c total c if(total > 0) cnt++; total > 0 total 0 cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt 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 i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	}
} 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 i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	}
} 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 i, j;
		int[] b = new int[m];
		for(i = 0;i < m; i++) {
			b[i] = sc.nextInt();
		}
		int total;
		int cnt = 0;
		for(i = 0;i < n; i++) {
			total = 0;
			for(j = 0;j < m; j++) {
				total += b[j]*sc.nextInt();
			}
			total += c;
			if(total > 0) cnt++;
		}
		System.out.println(cnt);
	}
}
