import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int M = Integer.parseInt(sc.next());
	int C = Integer.parseInt(sc.next());
	int[] b = new int[M];
	for(int i = 0; i<M; i++) {
	    b[i] = Integer.parseInt(sc.next());
	}
	int cnt = 0;
	for(int i = 0; i<N; i++) {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	}
	System.out.println(cnt);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int M = Integer.parseInt(sc.next());
	int C = Integer.parseInt(sc.next());
	int[] b = new int[M];
	for(int i = 0; i<M; i++) {
	    b[i] = Integer.parseInt(sc.next());
	}
	int cnt = 0;
	for(int i = 0; i<N; i++) {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	}
	System.out.println(cnt);
    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int M = Integer.parseInt(sc.next());
	int C = Integer.parseInt(sc.next());
	int[] b = new int[M];
	for(int i = 0; i<M; i++) {
	    b[i] = Integer.parseInt(sc.next());
	}
	int cnt = 0;
	for(int i = 0; i<N; i++) {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	}
	System.out.println(cnt);
    } main {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int M = Integer.parseInt(sc.next());
	int C = Integer.parseInt(sc.next());
	int[] b = new int[M];
	for(int i = 0; i<M; i++) {
	    b[i] = Integer.parseInt(sc.next());
	}
	int cnt = 0;
	for(int i = 0; i<N; i++) {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	}
	System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int C = Integer.parseInt(sc.next()); C Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] b = new int[M]; b new int[M] M for(int i = 0; i<M; i++) {
	    b[i] = Integer.parseInt(sc.next());
	} int i = 0; int i = 0; i 0 i<M i M i++ i++ i {
	    b[i] = Integer.parseInt(sc.next());
	} {
	    b[i] = Integer.parseInt(sc.next());
	} b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 for(int i = 0; i<N; i++) {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	} {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	} int tmp = 0; tmp 0 for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    } int j = 0; int j = 0; j 0 j<M j M j++ j++ j {
		tmp += sc.nextInt() * b[j];
	    } {
		tmp += sc.nextInt() * b[j];
	    } tmp += sc.nextInt() * b[j] tmp sc.nextInt() * b[j] sc.nextInt() sc.nextInt sc b[j] b j tmp += C tmp C if(tmp>0) cnt++; tmp>0 tmp 0 cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int M = Integer.parseInt(sc.next());
	int C = Integer.parseInt(sc.next());
	int[] b = new int[M];
	for(int i = 0; i<M; i++) {
	    b[i] = Integer.parseInt(sc.next());
	}
	int cnt = 0;
	for(int i = 0; i<N; i++) {
	    int tmp = 0;
	    for(int j = 0; j<M; j++) {
		tmp += sc.nextInt() * b[j];
	    }
	    tmp += C;
	    if(tmp>0) cnt++;
	}
	System.out.println(cnt);
    }
}