import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] B = new int[M];
		for(int i = 0; i < M; i++) {
			B[i] = sc.nextInt();
		}
		int cnt = 0;
		for(int i = 0; i < N; i++) {
			int num = C;
			for(int j = 0; j < M; j++) {
				num += sc.nextInt() * B[j];
			}
			if(num > 0)cnt++;
		}
		System.out.println(cnt);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
}
 import java.util.*; util.* java public class Main {
	Scanner sc = new Scanner(System.in);

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

	void doIt() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] B = new int[M];
		for(int i = 0; i < M; i++) {
			B[i] = sc.nextInt();
		}
		int cnt = 0;
		for(int i = 0; i < N; i++) {
			int num = C;
			for(int j = 0; j < M; j++) {
				num += sc.nextInt() * B[j];
			}
			if(num > 0)cnt++;
		}
		System.out.println(cnt);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] B = new int[M];
		for(int i = 0; i < M; i++) {
			B[i] = sc.nextInt();
		}
		int cnt = 0;
		for(int i = 0; i < N; i++) {
			int num = C;
			for(int j = 0; j < M; j++) {
				num += sc.nextInt() * B[j];
			}
			if(num > 0)cnt++;
		}
		System.out.println(cnt);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main
import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int C = sc.nextInt();
		int[] B = new int[M];
		for(int i = 0; i < M; i++) {
			B[i] = sc.nextInt();
		}
		int cnt = 0;
		for(int i = 0; i < N; i++) {
			int num = C;
			for(int j = 0; j < M; j++) {
				num += sc.nextInt() * B[j];
			}
			if(num > 0)cnt++;
		}
		System.out.println(cnt);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
}

