import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.LinkedList;
import java.util.List;
import java.util.TreeMap;
//import org.apache.commons.lang3.StringUtils;
 
 
/**
 *
 * @author aj
 */
public class Main {
    
    public static void main(String[] args){
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    }
    
    
    
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.BufferedOutputStream; BufferedOutputStream java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset import java.util.LinkedList; LinkedList java.util import java.util.List; List java.util import java.util.TreeMap; TreeMap java.util public class Main {
    
    public static void main(String[] args){
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    }
    
    
    
} Main public static void main(String[] args){
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    } main {
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    } try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        } catch(Exception ex){
            ex.printStackTrace();
        } Exception ex {
            ex.printStackTrace();
        } ex.printStackTrace() ex.printStackTrace ex {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        } BufferedInputStream bf = new BufferedInputStream(System.in); bf new BufferedInputStream(System.in) BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8)); in new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8)) OutputStream out = new BufferedOutputStream ( System.out ); out new BufferedOutputStream ( System.out ) String[] nmc = in.readLine().split(" "); nmc in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(nmc[0]); n Integer.parseInt(nmc[0]) Integer.parseInt Integer nmc[0] nmc 0 int m = Integer.parseInt(nmc[1]); m Integer.parseInt(nmc[1]) Integer.parseInt Integer nmc[1] nmc 1 int c = Integer.parseInt(nmc[2]); c Integer.parseInt(nmc[2]) Integer.parseInt Integer nmc[2] nmc 2 String[] sb = in.readLine().split(" "); sb in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int r = 0; r 0 for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            } {
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            } int s = c; s c String[] sa = in.readLine().split(" "); sa in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                } {
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                } s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]) s Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]) Integer.parseInt(sa[j]) Integer.parseInt Integer sa[j] sa j Integer.parseInt(sb[j]) Integer.parseInt Integer sb[j] sb j if (s>0) r++; s>0 s 0 r++ r out.write((r+"\n").getBytes()) out.write out (r+"\n").getBytes() (r+"\n").getBytes (r+"\n") r "\n" out.flush() out.flush out String[] args args public class Main {
    
    public static void main(String[] args){
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    }
    
    
    
} public class Main {
    
    public static void main(String[] args){
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    }
    
    
    
} Main
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.LinkedList;
import java.util.List;
import java.util.TreeMap;
//import org.apache.commons.lang3.StringUtils;
 
 
/**
 *
 * @author aj
 */
public class Main {
    
    public static void main(String[] args){
        try {
            //Scanner sc = new Scanner(System.in);
            BufferedInputStream bf = new BufferedInputStream(System.in);
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(bf, StandardCharsets.UTF_8));
            OutputStream out = new BufferedOutputStream ( System.out );
            String[] nmc = in.readLine().split(" ");
            int n = Integer.parseInt(nmc[0]);
            int m = Integer.parseInt(nmc[1]);
            int c = Integer.parseInt(nmc[2]);
            
            String[] sb = in.readLine().split(" ");
            int r = 0;
            for(int i=0;i<n;i++){
                int s = c;
                String[] sa = in.readLine().split(" ");
                for(int j=0;j<m;j++){
                    s += Integer.parseInt(sa[j]) * Integer.parseInt(sb[j]);
                }
                if (s>0) r++;
            }
            out.write((r+"\n").getBytes());
            out.flush();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
    }
    
    
    
}