import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int C = Integer.parseInt(sc.next()); C Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 int[] b = new int[M]; b new int[M] M int[][] a = new int[N][M]; a new int[N][M] N M for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            b[i] = Integer.parseInt(sc.next());
        } {
            b[i] = Integer.parseInt(sc.next());
        } b[i] = Integer.parseInt(sc.next()) b[i] b i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        } 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] = Integer.parseInt(sc.next());
            }
        } {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        } for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            } int j = 0; int j = 0; j 0 j < M j M j++ j++ j {
                a[i][j] = Integer.parseInt(sc.next());
            } {
                a[i][j] = Integer.parseInt(sc.next());
            } a[i][j] = Integer.parseInt(sc.next()) a[i][j] a[i] a i j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        } {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        } long sum = 0; sum 0 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 + C > 0) ans++; sum + C > 0 sum + C sum C 0 ans++ ans out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        final int M = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int ans = 0;
        int[] b = new int[M];
        int[][] a = new int[N][M];
        for (int i = 0; i < M; i++) {
            b[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        for (int i=0; i<N; i++) {
            long sum = 0;
            for (int j=0; j<M; j++) {
                sum += a[i][j] * b[j];
            }
            if (sum + C > 0) ans++;
        }
        out.println(ans);
        
        out.flush();
    }
}