import java.util.*;
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	}
	public static void main(String[] args) {
		solve();

	}

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

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	}
	public static void main(String[] args) {
		solve();

	}

} Main static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	} solve {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	} 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 res = 0; res 0 int barray[] = new int [m]; barray new int [m] m for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i<m i m i++ i++ i {
			barray[i] = sc.nextInt();
		} {
			barray[i] = sc.nextInt();
		} barray[i] = sc.nextInt() barray[i] barray i sc.nextInt() sc.nextInt sc int array[][] = new int [n][m]; array new int [n][m] n m for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		} for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
				array[i][j] = sc.nextInt();
			} {
				array[i][j] = sc.nextInt();
			} array[i][j] = sc.nextInt() array[i][j] array[i] array i j sc.nextInt() sc.nextInt sc for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		} {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		} int sum = 0; sum 0 for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			} int j = 0; int j = 0; j 0 j<m j m j++ j++ j {
				sum += array[i][j]*barray[j];
			} {
				sum += array[i][j]*barray[j];
			} sum += array[i][j]*barray[j] sum array[i][j]*barray[j] array[i][j] array[i] array i j barray[j] barray j if(sum+c>0) res++; sum+c>0 sum+c sum c 0 res++ res System.out.println(res) System.out.println System.out System System.out res sc.close() sc.close sc public static void main(String[] args) {
		solve();

	} main {
		solve();

	} solve() solve String[] args args public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	}
	public static void main(String[] args) {
		solve();

	}

} public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	}
	public static void main(String[] args) {
		solve();

	}

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

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		int res = 0;
		int barray[] = new int [m];
		for(int i = 0;i<m;i++) {
			barray[i] = sc.nextInt();
		}
		int array[][] = new int [n][m];
		for(int i = 0;i<n;i++) {
			for(int j = 0;j<m;j++) {
				array[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i<n;i++) {
			int sum = 0;
			for(int j = 0;j<m;j++) {
				sum += array[i][j]*barray[j];
			}
			if(sum+c>0) res++;
		}
			System.out.println(res);
		sc.close();
	}
	public static void main(String[] args) {
		solve();

	}

}