import java.util.Scanner;

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 b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner 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 b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} 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 b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	} 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 b[] = new int[m]; b new int[m] m int a[][] = new int[n][m]; a new int[n][m] n 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 for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		} {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		} for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			} int o = 0; int o = 0; o 0 o < m o m o++ o++ o {
				a[i][o] = sc.nextInt();
			} {
				a[i][o] = sc.nextInt();
			} a[i][o] = sc.nextInt() a[i][o] a[i] a i o sc.nextInt() sc.nextInt sc int kei = 0; kei 0 int ans = 0; ans 0 for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		} {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		} kei = 0 kei 0 for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			} int o = 0; int o = 0; o 0 o < m o m o++ o++ o {
				kei += b[o] * a[i][o];
			} {
				kei += b[o] * a[i][o];
			} kei += b[o] * a[i][o] kei b[o] * a[i][o] b[o] b o a[i][o] a[i] a i o kei += c kei c if (kei > 0) {
				ans++;
			} kei > 0 kei 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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} 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 b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

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 b[] = new int[m];
		int a[][] = new int[n][m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int o = 0; o < m; o++) {
				a[i][o] = sc.nextInt();
			}
		}
		int kei = 0;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			kei = 0;
			for (int o = 0; o < m; o++) {
				kei += b[o] * a[i][o];
			}
			kei += c;
			if (kei > 0) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}