import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int 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] = in.nextInt() b[i] b i in.nextInt() in.nextInt in int[][] a = new int[n][m]; a new int[n][m] n m int count = 0; count 0 int point = 0; point 0 for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        } {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        } point = 0 point 0 for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                point += in.nextInt() * b[j];
            } {
                point += in.nextInt() * b[j];
            } point += in.nextInt() * b[j] point in.nextInt() * b[j] in.nextInt() in.nextInt in b[j] b j point += c point c if (point > 0) count++; point > 0 point 0 count++ count in.close() in.close in 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 in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int 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];
        int count = 0;
        int point = 0;
        for (int i = 0; i < n; i++) {
            point = 0;
            for (int j = 0; j < m; j++) {
                point += in.nextInt() * b[j];
            }
            point += c;
            if (point > 0) count++;
        }
        in.close();
        System.out.println(count);
    }
}
