import  java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;

class Main
{  

    
    public static boolean[] sieve(long n)
    {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    } 

    
    static long GCD(long a,long b)
    {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    }

    static long CountCoPrimes(long n)
    {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    }


    //fastest way to find x**n
    static long modularExponentiation(long x,long n,long m)
    {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    }

    static long lcm(long a,long b)
    {
        return (a*b)/GCD(a,b);
    }

   
    static long pow(long a,long b)
    {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    }

   static long modInverse(long A,long M)
   {
    return modularExponentiation(A,M-2,M);
   }
 
   

    

    static boolean prime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    }

   


   
   
  
    public static void main(String[] args) throws IOException
    {
     
        new Main().run();
       
    }


    static int rev(int n)
    {
        int x=0;
        int num = 0;
        while(n>0)
        {
            x = n%10;
            num = num*10+x;
            n/=10;

        }
        return num;
    }


    static Scanner in = new Scanner(System.in);
    static void run() throws IOException
    {
        int N = ni();
        int M = ni();
        int C = ni();
        int[] Bi = new int[M];
        int[][] Ai = new int[N][M]; 
        for(int i=0;i<M;i++)
        {
            Bi[i] = ni();
        }

       
        int count=0;
        int j=0;
        int sum=0;
        while(N-->0)
        {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        }   
       

        printL(count);
    }   


    

  
   
    

    
       
    

    
   
  



   

    static void printL(long a)
    {
        System.out.println(a);
    }
    static void printS(String s)
    {
        System.out.println(s);
    }

    static void printD(Double d)
    {
        System.out.println(d);
    }
  
   
   
    static void swap(char c,char p)
    {
        char t = c;
        c = p;
        p = t;
    }

    static long max(long n,long m)
    {
        return Math.max(n,m);
    }
    static long min(long n,long m)
    {
        return Math.min(n,m);
    }

    static double nd() throws IOException
    {
        return Double.parseDouble(in.next());
    }
    static int ni() throws IOException
    {
        return Integer.parseInt(in.next());
    }

    static long nl() throws IOException
    {
        return Long.parseLong(in.next());
    }

    static String si() throws IOException
    {
        return in.next();
    }


  
   
    static int abs(int n)
    {
        return Math.abs(n);
    }

    static class Scanner 
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException 
        {
            while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}
        
        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready();}


    }

    
}
 import  java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.util.*; util.* java import java.math.*; math.* java import java.io.*; io.* java import java.text.*; text.* java class Main
{  

    
    public static boolean[] sieve(long n)
    {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    } 

    
    static long GCD(long a,long b)
    {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    }

    static long CountCoPrimes(long n)
    {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    }


    //fastest way to find x**n
    static long modularExponentiation(long x,long n,long m)
    {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    }

    static long lcm(long a,long b)
    {
        return (a*b)/GCD(a,b);
    }

   
    static long pow(long a,long b)
    {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    }

   static long modInverse(long A,long M)
   {
    return modularExponentiation(A,M-2,M);
   }
 
   

    

    static boolean prime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    }

   


   
   
  
    public static void main(String[] args) throws IOException
    {
     
        new Main().run();
       
    }


    static int rev(int n)
    {
        int x=0;
        int num = 0;
        while(n>0)
        {
            x = n%10;
            num = num*10+x;
            n/=10;

        }
        return num;
    }


    static Scanner in = new Scanner(System.in);
    static void run() throws IOException
    {
        int N = ni();
        int M = ni();
        int C = ni();
        int[] Bi = new int[M];
        int[][] Ai = new int[N][M]; 
        for(int i=0;i<M;i++)
        {
            Bi[i] = ni();
        }

       
        int count=0;
        int j=0;
        int sum=0;
        while(N-->0)
        {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        }   
       

        printL(count);
    }   


    

  
   
    

    
       
    

    
   
  



   

    static void printL(long a)
    {
        System.out.println(a);
    }
    static void printS(String s)
    {
        System.out.println(s);
    }

    static void printD(Double d)
    {
        System.out.println(d);
    }
  
   
   
    static void swap(char c,char p)
    {
        char t = c;
        c = p;
        p = t;
    }

    static long max(long n,long m)
    {
        return Math.max(n,m);
    }
    static long min(long n,long m)
    {
        return Math.min(n,m);
    }

    static double nd() throws IOException
    {
        return Double.parseDouble(in.next());
    }
    static int ni() throws IOException
    {
        return Integer.parseInt(in.next());
    }

    static long nl() throws IOException
    {
        return Long.parseLong(in.next());
    }

    static String si() throws IOException
    {
        return in.next();
    }


  
   
    static int abs(int n)
    {
        return Math.abs(n);
    }

    static class Scanner 
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException 
        {
            while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}
        
        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready();}


    }

    
} Main static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static boolean[] sieve(long n)
    {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    } sieve {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    } boolean[] prime = new boolean[(int)n+1]; prime new boolean[(int)n+1] (int)n+1 (int)n 1 Arrays.fill(prime,true) Arrays.fill Arrays prime true prime[0] = false prime[0] prime 0 false prime[1] = false prime[1] prime 1 false long m = (long)Math.sqrt(n); m (long)Math.sqrt(n) Math.sqrt Math n for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        } int i=2; int i=2; i 2 i<=m i m i++ i++ i {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        } {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        } if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            } prime[i] prime i {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            } for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                } int k=i*i; int k=i*i; k i*i i i k<=n k n k+=i k+=i k i {
                    prime[k] = false;
                } {
                    prime[k] = false;
                } prime[k] = false prime[k] prime k false return prime; prime long n n static long GCD(long a,long b)
    {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    } GCD {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    } if(a==0 || b==0)
        {
            return 0;
        } a==0 || b==0 a==0 a 0 b==0 b 0 {
            return 0;
        } return 0; 0 if(a==b)
        {
            return a;
        } a==b a b {
            return a;
        } return a; a if(a>b)
        {
            return GCD(a-b,b);
        } a>b a b {
            return GCD(a-b,b);
        } return GCD(a-b,b); GCD(a-b,b) GCD a-b a b b return GCD(a,b-a); GCD(a,b-a) GCD a b-a b a long a a long b b static long CountCoPrimes(long n)
    {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    } CountCoPrimes {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    } long res = n; res n for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        } int i=2; int i=2; i 2 i*i<=n i*i i i n i++ i++ i {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        } {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        } if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            } n%i==0 n%i n i 0 {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            } while(n%i==0)
                {
                    n/=i;
                } n%i==0 n%i n i 0 {
                    n/=i;
                } n/=i n i res-=res/i res res/i res i if(n>1)
        {
            res-=res/n;
        } n>1 n 1 {
            res-=res/n;
        } res-=res/n res res/n res n return res; res long n n //fastest way to find x**n
    static long modularExponentiation(long x,long n,long m)
    {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    } modularExponentiation {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    } long res = 1; res 1 while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        } n>0 n 0 {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        } if(n%2==1)
            {
                res = (res*x)%m;
            } n%2==1 n%2 n 2 1 {
                res = (res*x)%m;
            } res = (res*x)%m res (res*x)%m (res*x) res x m x =(x*x)%m x (x*x)%m (x*x) x x m n/=2 n 2 return res; res long x x long n n long m m static long lcm(long a,long b)
    {
        return (a*b)/GCD(a,b);
    } lcm {
        return (a*b)/GCD(a,b);
    } return (a*b)/GCD(a,b); (a*b)/GCD(a,b) (a*b) a b GCD(a,b) GCD a b long a a long b b static long pow(long a,long b)
    {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    } pow {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    } long res = 1; res 1 while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        } b>0 b 0 {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        } if((b&1)==1)
            {
                res *= a;
            } (b&1)==1 (b&1) b 1 1 {
                res *= a;
            } res *= a res a b >>= 1 b 1 a *=a a a return res; res long a a long b b static long modInverse(long A,long M)
   {
    return modularExponentiation(A,M-2,M);
   } modInverse {
    return modularExponentiation(A,M-2,M);
   } return modularExponentiation(A,M-2,M); modularExponentiation(A,M-2,M) modularExponentiation A M-2 M 2 M long A A long M M static boolean prime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    } prime {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    } for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        } int i=2; int i=2; i 2 i*i<=n i*i i i n i++ i++ i {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        } {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        } if(i%2==0 ||i%3==0)
            {
                return false;
            } i%2==0 ||i%3==0 i%2==0 i%2 i 2 0 i%3==0 i%3 i 3 0 {
                return false;
            } return false; false return true; true int n n public static void main(String[] args) throws IOException
    {
     
        new Main().run();
       
    } main {
     
        new Main().run();
       
    } new Main().run() new Main().run new Main() String[] args args static int rev(int n)
    {
        int x=0;
        int num = 0;
        while(n>0)
        {
            x = n%10;
            num = num*10+x;
            n/=10;

        }
        return num;
    } rev {
        int x=0;
        int num = 0;
        while(n>0)
        {
            x = n%10;
            num = num*10+x;
            n/=10;

        }
        return num;
    } int x=0; x 0 int num = 0; num 0 while(n>0)
        {
            x = n%10;
            num = num*10+x;
            n/=10;

        } n>0 n 0 {
            x = n%10;
            num = num*10+x;
            n/=10;

        } x = n%10 x n%10 n 10 num = num*10+x num num*10+x num*10 num 10 x n/=10 n 10 return num; num int n n static void run() throws IOException
    {
        int N = ni();
        int M = ni();
        int C = ni();
        int[] Bi = new int[M];
        int[][] Ai = new int[N][M]; 
        for(int i=0;i<M;i++)
        {
            Bi[i] = ni();
        }

       
        int count=0;
        int j=0;
        int sum=0;
        while(N-->0)
        {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        }   
       

        printL(count);
    } run {
        int N = ni();
        int M = ni();
        int C = ni();
        int[] Bi = new int[M];
        int[][] Ai = new int[N][M]; 
        for(int i=0;i<M;i++)
        {
            Bi[i] = ni();
        }

       
        int count=0;
        int j=0;
        int sum=0;
        while(N-->0)
        {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        }   
       

        printL(count);
    } int N = ni(); N ni() ni int M = ni(); M ni() ni int C = ni(); C ni() ni int[] Bi = new int[M]; Bi new int[M] M int[][] Ai = new int[N][M]; Ai new int[N][M] N M for(int i=0;i<M;i++)
        {
            Bi[i] = ni();
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            Bi[i] = ni();
        } {
            Bi[i] = ni();
        } Bi[i] = ni() Bi[i] Bi i ni() ni int count=0; count 0 int j=0; j 0 int sum=0; sum 0 while(N-->0)
        {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        } N-->0 N-- N 0 {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        } for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            } int i=0; int i=0; i 0 i<M i M i++ i++ i {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            } {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            } Ai[j][i] = ni() Ai[j][i] Ai[j] Ai j i ni() ni sum+=Ai[j][i]*Bi[i] sum Ai[j][i]*Bi[i] Ai[j][i] Ai[j] Ai j i Bi[i] Bi i if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                } i==M-1 i M-1 M 1 {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                } if(sum+C>0)
                    {
                        count++;
                    } sum+C>0 sum+C sum C 0 {
                        count++;
                    } count++ count sum=0 sum 0 j++ j printL(count) printL count static void printL(long a)
    {
        System.out.println(a);
    } printL {
        System.out.println(a);
    } System.out.println(a) System.out.println System.out System System.out a long a a static void printS(String s)
    {
        System.out.println(s);
    } printS {
        System.out.println(s);
    } System.out.println(s) System.out.println System.out System System.out s String s s static void printD(Double d)
    {
        System.out.println(d);
    } printD {
        System.out.println(d);
    } System.out.println(d) System.out.println System.out System System.out d Double d d static void swap(char c,char p)
    {
        char t = c;
        c = p;
        p = t;
    } swap {
        char t = c;
        c = p;
        p = t;
    } char t = c; t c c = p c p p = t p t char c c char p p static long max(long n,long m)
    {
        return Math.max(n,m);
    } max {
        return Math.max(n,m);
    } return Math.max(n,m); Math.max(n,m) Math.max Math n m long n n long m m static long min(long n,long m)
    {
        return Math.min(n,m);
    } min {
        return Math.min(n,m);
    } return Math.min(n,m); Math.min(n,m) Math.min Math n m long n n long m m static double nd() throws IOException
    {
        return Double.parseDouble(in.next());
    } nd {
        return Double.parseDouble(in.next());
    } return Double.parseDouble(in.next()); Double.parseDouble(in.next()) Double.parseDouble Double in.next() in.next in static int ni() throws IOException
    {
        return Integer.parseInt(in.next());
    } ni {
        return Integer.parseInt(in.next());
    } return Integer.parseInt(in.next()); Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in static long nl() throws IOException
    {
        return Long.parseLong(in.next());
    } nl {
        return Long.parseLong(in.next());
    } return Long.parseLong(in.next()); Long.parseLong(in.next()) Long.parseLong Long in.next() in.next in static String si() throws IOException
    {
        return in.next();
    } si {
        return in.next();
    } return in.next(); in.next() in.next in static int abs(int n)
    {
        return Math.abs(n);
    } abs {
        return Math.abs(n);
    } return Math.abs(n); Math.abs(n) Math.abs Math n int n n static class Scanner 
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException 
        {
            while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}
        
        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready();}


    } Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));} Scanner {  br = new BufferedReader(new InputStreamReader(s));} br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public String next() throws IOException 
        {
            while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                st = new StringTokenizer(br.readLine());
            } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {return Integer.parseInt(next());} nextInt {return Integer.parseInt(next());} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {return Long.parseLong(next());} nextLong {return Long.parseLong(next());} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {return br.readLine();} nextLine {return br.readLine();} return br.readLine(); br.readLine() br.readLine br public boolean ready() throws IOException {return br.ready();} ready {return br.ready();} return br.ready(); br.ready() br.ready br
import  java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;

class Main
{  

    
    public static boolean[] sieve(long n)
    {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    } 

    
    static long GCD(long a,long b)
    {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    }

    static long CountCoPrimes(long n)
    {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    }


    //fastest way to find x**n
    static long modularExponentiation(long x,long n,long m)
    {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    }

    static long lcm(long a,long b)
    {
        return (a*b)/GCD(a,b);
    }

   
    static long pow(long a,long b)
    {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    }

   static long modInverse(long A,long M)
   {
    return modularExponentiation(A,M-2,M);
   }
 
   

    

    static boolean prime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    }

   


   
   
  
    public static void main(String[] args) throws IOException
    {
     
        new Main().run();
       
    }


    static int rev(int n)
    {
        int x=0;
        int num = 0;
        while(n>0)
        {
            x = n%10;
            num = num*10+x;
            n/=10;

        }
        return num;
    }


    static Scanner in = new Scanner(System.in);
    static void run() throws IOException
    {
        int N = ni();
        int M = ni();
        int C = ni();
        int[] Bi = new int[M];
        int[][] Ai = new int[N][M]; 
        for(int i=0;i<M;i++)
        {
            Bi[i] = ni();
        }

       
        int count=0;
        int j=0;
        int sum=0;
        while(N-->0)
        {
            
            for(int i=0;i<M;i++)
            {
                Ai[j][i] = ni();
                sum+=Ai[j][i]*Bi[i];

                if(i==M-1)
                {
                    if(sum+C>0)
                    {
                        count++;
                    }
                    // System.out.println(sum+C);
                    sum=0;
                }
            }
            j++;
        }   
       

        printL(count);
    }   


    

  
   
    

    
       
    

    
   
  



   

    static void printL(long a)
    {
        System.out.println(a);
    }
    static void printS(String s)
    {
        System.out.println(s);
    }

    static void printD(Double d)
    {
        System.out.println(d);
    }
  
   
   
    static void swap(char c,char p)
    {
        char t = c;
        c = p;
        p = t;
    }

    static long max(long n,long m)
    {
        return Math.max(n,m);
    }
    static long min(long n,long m)
    {
        return Math.min(n,m);
    }

    static double nd() throws IOException
    {
        return Double.parseDouble(in.next());
    }
    static int ni() throws IOException
    {
        return Integer.parseInt(in.next());
    }

    static long nl() throws IOException
    {
        return Long.parseLong(in.next());
    }

    static String si() throws IOException
    {
        return in.next();
    }


  
   
    static int abs(int n)
    {
        return Math.abs(n);
    }

    static class Scanner 
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException 
        {
            while (st == null || !st.hasMoreTokens()) 
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}
        
        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready();}


    }

    
}

