import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int ans= 0; ans 0 int b[]= new int[m]; b new int[m] m for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		} int l = 0; int l = 0; l 0 l<m l m l++ l++ l {
			b[l]= scanner.nextInt();
		} {
			b[l]= scanner.nextInt();
		} b[l]= scanner.nextInt() b[l] b l scanner.nextInt() scanner.nextInt scanner for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		} int s=0; int s=0; s 0 s<n s n s++ s++ s {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		} {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		} int tmp = c; tmp c for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			} int t=0; int t=0; t 0 t<m t m t++ t++ t {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			} {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			} tmp += b[t]*scanner.nextInt() tmp b[t]*scanner.nextInt() b[t] b t scanner.nextInt() scanner.nextInt scanner if(tmp>0)ans++; tmp>0 tmp 0 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int c = scanner.nextInt();
		//int ary[][]= new int[n][m];
		int ans= 0;
		int b[]= new int[m];
		for(int l = 0; l<m; l++) {
			b[l]= scanner.nextInt();
		}
		for(int s=0; s<n; s++) {
			int tmp = c;
			for(int t=0; t<m; t++) {
				//ary[s][t]= scanner.nextInt();
			tmp += b[t]*scanner.nextInt(); 
			}
			if(tmp>0)ans++;
			
		}
		System.out.println(ans);
	}

}