import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int code =sc.nextInt(); code sc.nextInt() sc.nextInt sc int code2 = sc.nextInt(); code2 sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int[] b = new int[code2]; b new int[code2] code2 int num = 0; num 0 int num2 =0; num2 0 int sum = 0; sum 0 int count = 0; count 0 for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < code2 i code2 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<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		} int i = 0; int i = 0; i 0 i<code i code i++ i++ i {
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		} {
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		} for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			} int j=0; int j=0; j 0 j<code2 j code2 j++ j++ j {
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			} {
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			} num = sc.nextInt() num sc.nextInt() sc.nextInt sc num2 = b[j]*num num2 b[j]*num b[j] b j num sum += num2 sum num2 if(sum + c > 0)
			count++; sum + c > 0 sum + c sum c 0 count++ count sum = 0 sum 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int code =sc.nextInt();
		int code2 = sc.nextInt();
		int c = sc.nextInt();

		int[] b = new int[code2];
		int num = 0;
		int num2 =0;
		int sum = 0;
		int count = 0;

		for(int i = 0;i < code2;i++){
			b[i] = sc.nextInt();
		}

		for(int i = 0;i<code;i++){
			for(int j=0;j<code2;j++){
				num = sc.nextInt();
				num2 = b[j]*num;
				sum += num2;
			}
			if(sum + c > 0)
			count++;
			sum = 0;
		}

		System.out.println(count);
	}
}