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