import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    }
} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    }
} Main public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    } main {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int B[] = new int[M]; B new int[M] M int A[] = new int[M*N]; A new int[M*N] M*N M N for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {

            B[i] = scan.nextInt();

        } {

            B[i] = scan.nextInt();

        } B[i] = scan.nextInt() B[i] B i scan.nextInt() scan.nextInt scan for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            } int cnt = 0; int cnt = 0; cnt 0 cnt < M*N cnt M*N M N cnt++ cnt++ cnt {

                A[cnt] = scan.nextInt();

            } {

                A[cnt] = scan.nextInt();

            } A[cnt] = scan.nextInt() A[cnt] A cnt scan.nextInt() scan.nextInt scan scan.close() scan.close scan int ans = 0; ans 0 int cnt = 0; cnt 0 for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        } int howCodes = 0; int howCodes = 0; howCodes 0 howCodes < N howCodes N howCodes++ howCodes++ howCodes {

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        } {

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        } int calcAns = 0; calcAns 0 for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            } {

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            } calcAns = calcAns + A[cnt] * B[i] calcAns calcAns + A[cnt] * B[i] calcAns A[cnt] * B[i] A[cnt] A cnt B[i] B i cnt++ cnt calcAns = calcAns + C calcAns calcAns + C calcAns C if(calcAns > 0){
                ans++;
            } calcAns > 0 calcAns 0 {
                ans++;
            } ans++ ans System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main{

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    }
} public class Main{

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    }
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt();

        int M = scan.nextInt();

        int C = scan.nextInt();

        int B[] = new int[M];

        int A[] = new int[M*N];

        for(int i = 0; i < M; i++){

            B[i] = scan.nextInt();

        }

        for(int cnt = 0; cnt < M*N; cnt++){

                A[cnt] = scan.nextInt();

            }


        scan.close();

        int ans = 0;

        int cnt = 0;

        for(int howCodes = 0; howCodes < N; howCodes++){

            int calcAns = 0;

            for(int i = 0; i < M; i++){

                calcAns = calcAns + A[cnt] * B[i];
                cnt++;

            }
            calcAns = calcAns + C;

            if(calcAns > 0){
                ans++;
            }
        }


        System.out.print(ans);

    }
}