import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class Main {
    void solve() {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    void solve() {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} Main static FastScanner in; in static PrintWriter out; out void solve() {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    } solve {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    } int N = in.nextInt() N in.nextInt() in.nextInt in M = in.nextInt() M in.nextInt() in.nextInt in C = in.nextInt(); C in.nextInt() in.nextInt in int[] B = new int[M]; B new int[M] M for (int i = 0; i < M; i++) B[i] = in.nextInt(); int i = 0; int i = 0; i 0 i < M i M i++ i++ i B[i] = in.nextInt(); B[i] = in.nextInt() B[i] B i in.nextInt() in.nextInt in int[][] A = new int[N][M]; A new int[N][M] N M for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        } {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        } for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                A[i][j] = in.nextInt();
            } {
                A[i][j] = in.nextInt();
            } A[i][j] = in.nextInt() A[i][j] A[i] A i j in.nextInt() in.nextInt in int ans = 0; ans 0 for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        } {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        } int sum = C; sum C for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                sum += A[i][j] * B[j];
            } {
                sum += A[i][j] * B[j];
            } sum += A[i][j] * B[j] sum A[i][j] * B[j] A[i][j] A[i] A i j B[j] B j if (sum > 0) ans++; sum > 0 sum 0 ans++ ans out.println(ans) out.println out ans public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    } main {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    } in = new FastScanner(new BufferedReader(new InputStreamReader(System.in))) in new FastScanner(new BufferedReader(new InputStreamReader(System.in))) out = new PrintWriter(System.out) out new PrintWriter(System.out) new Main().solve() new Main().solve new Main() out.close() out.close out String[] args args static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    } FastScanner BufferedReader in; in StringTokenizer st; st public FastScanner(BufferedReader in) {
            this.in = in;
        } FastScanner {
            this.in = in;
        } this.in = in this.in this this.in in BufferedReader in in public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } nextToken {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(in.readLine());
                } st = new StringTokenizer(in.readLine()) st new StringTokenizer(in.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() {
            return Integer.parseInt(nextToken());
        } nextInt {
            return Integer.parseInt(nextToken());
        } return Integer.parseInt(nextToken()); Integer.parseInt(nextToken()) Integer.parseInt Integer nextToken() nextToken public long nextLong() {
            return Long.parseLong(nextToken());
        } nextLong {
            return Long.parseLong(nextToken());
        } return Long.parseLong(nextToken()); Long.parseLong(nextToken()) Long.parseLong Long nextToken() nextToken public double nextDouble() {
            return Double.parseDouble(nextToken());
        } nextDouble {
            return Double.parseDouble(nextToken());
        } return Double.parseDouble(nextToken()); Double.parseDouble(nextToken()) Double.parseDouble Double nextToken() nextToken public class Main {
    void solve() {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} public class Main {
    void solve() {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class Main {
    void solve() {
        int N = in.nextInt(), M = in.nextInt(), C = in.nextInt();
        int[] B = new int[M];
        for (int i = 0; i < M; i++) B[i] = in.nextInt();
        int[][] A = new int[N][M];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                A[i][j] = in.nextInt();
            }
        }
        
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int sum = C;
            for (int j = 0; j < M; j++) {
                sum += A[i][j] * B[j];
            }
            if (sum > 0) ans++;
        }
        out.println(ans);
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Main().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
