import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int[] b = new int[m]; b new int[m] m for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            b[i] = sc.nextInt();
        } {
            b[i] = sc.nextInt();
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc int cor = 0; cor 0 for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        } {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        } int tmp = 0; tmp 0 for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            } {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc tmp += (a * b[j]) tmp (a * b[j]) a b[j] b j tmp += c tmp c if (0 < tmp) cor++; 0 < tmp 0 tmp cor++ cor System.out.println(cor) System.out.println System.out System System.out cor String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int c = sc.nextInt();

        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }

        int cor = 0;
        for (int i = 0; i < n; i++) {
            int tmp = 0;
            for (int j = 0; j < m; j++) {
                int a = sc.nextInt();
//                System.out.println(a*b[j]);
                tmp += (a * b[j]);
            }
            tmp += c;
            if (0 < tmp) cor++;
        }
        System.out.println(cor);
    }
}
