import java. util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan int[] b = new int[m]; b new int[m] m int[][] a = new int[n][m]; a new int[n][m] n m int[] t = new int[m]; t new int[m] m int[] t1 = new int[n]; t1 new int[n] n int count = 0; count 0 int total = 0; total 0 for(int i=0;i<m;i++) {
			b[i] = scan.nextInt();
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			b[i] = scan.nextInt();
		} {
			b[i] = scan.nextInt();
		} b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		} {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		} for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			} {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			} a[i][j] = scan.nextInt() a[i][j] a[i] a i j scan.nextInt() scan.nextInt scan t[j]=a[i][j]*b[j] t[j] t j a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j t1[i]+=t[j] t1[i] t1 i t[j] t j for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(t1[i]+c>0) {
				count++;
			}
		} {
			if(t1[i]+c>0) {
				count++;
			}
		} if(t1[i]+c>0) {
				count++;
			} t1[i]+c>0 t1[i]+c t1[i] t1 i c 0 {
				count++;
			} count++ count 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int c = scan.nextInt();

		int[] b = new int[m];
		int[][] a = new int[n][m];
		int[] t = new int[m];
		int[] t1 = new int[n];

		int count = 0;
		int total = 0;

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

		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j] = scan.nextInt();
				t[j]=a[i][j]*b[j];
				t1[i]+=t[j];
			}
		}

		for(int i=0;i<n;i++) {
			if(t1[i]+c>0) {
				count++;
			}
		}

		System.out.println(count);
	}

}
