import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    }
} Main public static void main(String[] args) {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    } main {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    } Scanner sc1=new Scanner(System.in); sc1 new Scanner(System.in) int temp=0; temp 0 long suma; suma byte N=sc1.nextByte(); N sc1.nextByte() sc1.nextByte sc1 byte M=sc1.nextByte(); M sc1.nextByte() sc1.nextByte sc1 byte C=sc1.nextByte(); C sc1.nextByte() sc1.nextByte sc1 byte arr[]=new byte[M]; arr new byte[M] M for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();} byte i=0; byte i=0; i 0 i<M i M i++ i++ i {arr[i]=sc1.nextByte();} {arr[i]=sc1.nextByte();} arr[i]=sc1.nextByte() arr[i] arr i sc1.nextByte() sc1.nextByte sc1 byte matriz[][]=new byte[N][M]; matriz new byte[N][M] N M for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
} byte i=0; byte i=0; i 0 i<N i N i++ i++ i {
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
} {
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
} for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();} byte j=0; byte j=0; j 0 j<M j M j++ j++ j {matriz[i][j]=sc1.nextByte();} {matriz[i][j]=sc1.nextByte();} matriz[i][j]=sc1.nextByte() matriz[i][j] matriz[i] matriz i j sc1.nextByte() sc1.nextByte sc1 for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
} byte i=0; byte i=0; i 0 i<N i N i++ i++ i {suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
} {suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
} suma=C suma C for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);} byte j=0; byte j=0; j 0 j<M j M j++ j++ j {suma+=(matriz[i][j]*arr[j]);} {suma+=(matriz[i][j]*arr[j]);} suma+=(matriz[i][j]*arr[j]) suma (matriz[i][j]*arr[j]) matriz[i][j] matriz[i] matriz i j arr[j] arr j if(suma>0){temp++;} suma>0 suma 0 {temp++;} temp++ temp System.out.println(temp) System.out.println System.out System System.out temp String[] args args public class Main {

    public static void main(String[] args) {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    }
} public class Main {

    public static void main(String[] args) {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
Scanner sc1=new Scanner(System.in);
int temp=0;
long suma;
byte N=sc1.nextByte();
byte M=sc1.nextByte();
byte C=sc1.nextByte();
byte arr[]=new byte[M];
for(byte i=0;i<M;i++){arr[i]=sc1.nextByte();}
byte matriz[][]=new byte[N][M];
for(byte i=0;i<N;i++){
for(byte j=0;j<M;j++){matriz[i][j]=sc1.nextByte();}
}
for(byte i=0;i<N;i++){suma=C;
for(byte j=0;j<M;j++){suma+=(matriz[i][j]*arr[j]);}
if(suma>0){temp++;}
}
        System.out.println(temp);
    }
}