import java.io.*;
class Program{

}
class Main{
    public static void main(String[] args) throws IOException {
        Program obj = new Program();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ip[];
        int N,M,C;
        int A[],B[];
        ip = in.readLine().split(" ");
        N = Integer.parseInt(ip[0]);
        M = Integer.parseInt(ip[1]);
        C = Integer.parseInt(ip[2]);
        int count = 0,score=0;
        A = new int[M]; B = new int[M];
        ip = in.readLine().split(" ");
            for(int i=0;i<M;i++) B[i] = Integer.parseInt(ip[i]);
        while(--N>=0){
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        }
        System.out.println(count);
    }
} import java.io.*; io.* java class Program{

} Program class Main{
    public static void main(String[] args) throws IOException {
        Program obj = new Program();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ip[];
        int N,M,C;
        int A[],B[];
        ip = in.readLine().split(" ");
        N = Integer.parseInt(ip[0]);
        M = Integer.parseInt(ip[1]);
        C = Integer.parseInt(ip[2]);
        int count = 0,score=0;
        A = new int[M]; B = new int[M];
        ip = in.readLine().split(" ");
            for(int i=0;i<M;i++) B[i] = Integer.parseInt(ip[i]);
        while(--N>=0){
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws IOException {
        Program obj = new Program();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ip[];
        int N,M,C;
        int A[],B[];
        ip = in.readLine().split(" ");
        N = Integer.parseInt(ip[0]);
        M = Integer.parseInt(ip[1]);
        C = Integer.parseInt(ip[2]);
        int count = 0,score=0;
        A = new int[M]; B = new int[M];
        ip = in.readLine().split(" ");
            for(int i=0;i<M;i++) B[i] = Integer.parseInt(ip[i]);
        while(--N>=0){
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        }
        System.out.println(count);
    } main {
        Program obj = new Program();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ip[];
        int N,M,C;
        int A[],B[];
        ip = in.readLine().split(" ");
        N = Integer.parseInt(ip[0]);
        M = Integer.parseInt(ip[1]);
        C = Integer.parseInt(ip[2]);
        int count = 0,score=0;
        A = new int[M]; B = new int[M];
        ip = in.readLine().split(" ");
            for(int i=0;i<M;i++) B[i] = Integer.parseInt(ip[i]);
        while(--N>=0){
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        }
        System.out.println(count);
    } Program obj = new Program(); obj new Program() BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String ip[]; ip int N N M M C; C int A[] A B[]; B ip = in.readLine().split(" ") ip in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " N = Integer.parseInt(ip[0]) N Integer.parseInt(ip[0]) Integer.parseInt Integer ip[0] ip 0 M = Integer.parseInt(ip[1]) M Integer.parseInt(ip[1]) Integer.parseInt Integer ip[1] ip 1 C = Integer.parseInt(ip[2]) C Integer.parseInt(ip[2]) Integer.parseInt Integer ip[2] ip 2 int count = 0 count 0 score=0; score 0 A = new int[M] A new int[M] M B = new int[M] B new int[M] M ip = in.readLine().split(" ") ip in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for(int i=0;i<M;i++) B[i] = Integer.parseInt(ip[i]); int i=0; int i=0; i 0 i<M i M i++ i++ i B[i] = Integer.parseInt(ip[i]); B[i] = Integer.parseInt(ip[i]) B[i] B i Integer.parseInt(ip[i]) Integer.parseInt Integer ip[i] ip i while(--N>=0){
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        } --N>=0 --N N 0 {
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        } ip = in.readLine().split(" ") ip in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " score = 0 score 0 for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            } int i=0; int i=0; i 0 i<M i M i++ i++ i {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            } {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            } A[i] = Integer.parseInt(ip[i]) A[i] A i Integer.parseInt(ip[i]) Integer.parseInt Integer ip[i] ip i score+=B[i]*A[i] score B[i]*A[i] B[i] B i A[i] A i if (score+C>0) count++; score+C>0 score+C score C 0 count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.io.*;
class Program{

}
class Main{
    public static void main(String[] args) throws IOException {
        Program obj = new Program();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ip[];
        int N,M,C;
        int A[],B[];
        ip = in.readLine().split(" ");
        N = Integer.parseInt(ip[0]);
        M = Integer.parseInt(ip[1]);
        C = Integer.parseInt(ip[2]);
        int count = 0,score=0;
        A = new int[M]; B = new int[M];
        ip = in.readLine().split(" ");
            for(int i=0;i<M;i++) B[i] = Integer.parseInt(ip[i]);
        while(--N>=0){
            ip = in.readLine().split(" ");
            score = 0;
            for(int i=0;i<M;i++) {
                A[i] = Integer.parseInt(ip[i]);
                score+=B[i]*A[i];
            }
            if (score+C>0) count++;
        }
        System.out.println(count);
    }
}