import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int target = Integer.parseInt(sc.next()); target Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] base = new int[m]; base new int[m] m for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            base[i] = Integer.parseInt(sc.next());
        } {
            base[i] = Integer.parseInt(sc.next());
        } base[i] = Integer.parseInt(sc.next()) base[i] base i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        } {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        } int sum = 0; sum 0 for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                sum += Integer.parseInt(sc.next()) * base[j];
            } {
                sum += Integer.parseInt(sc.next()) * base[j];
            } sum += Integer.parseInt(sc.next()) * base[j] sum Integer.parseInt(sc.next()) * base[j] Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc base[j] base j if (sum + target > 0) cnt++; sum + target > 0 sum + target sum target 0 cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next());
        int[] base = new int[m];
        for (int i = 0; i < m; i++) {
            base[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < m; j++) {
                sum += Integer.parseInt(sc.next()) * base[j];
            }
            if (sum + target > 0) cnt++;
        }
        System.out.println(cnt);
    }
}