import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util import java.util.Arrays; Arrays java.util public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







}
} Main public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







} main {
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final List<Integer> list = new ArrayList<>(); list new ArrayList<>() 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 hairetu1[] = new int[m]; hairetu1 new int[m] m int hairetu2[][] = new int[n][m]; hairetu2 new int[n][m] n m int count = 0; count 0 int sum = 0; sum 0 for(int i = 0 ; i < m ; i++){
        hairetu1[i] = sc.nextInt();
    } int i = 0 ; int i = 0 ; i 0 i < m i m i++ i++ i {
        hairetu1[i] = sc.nextInt();
    } {
        hairetu1[i] = sc.nextInt();
    } hairetu1[i] = sc.nextInt() hairetu1[i] hairetu1 i sc.nextInt() sc.nextInt sc for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    } {
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    } for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        } int j = 0 ; int j = 0 ; j 0 j < m j m j++ j++ j {
            hairetu2[i][j] = sc.nextInt();
        } {
            hairetu2[i][j] = sc.nextInt();
        } hairetu2[i][j] = sc.nextInt() hairetu2[i][j] hairetu2[i] hairetu2 i j sc.nextInt() sc.nextInt sc for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    } {
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    } for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        } int j = 0 ; int j = 0 ; j 0 j < m j m j++ j++ j {
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        } {
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        } sum += hairetu1[j] * hairetu2[i][j] sum hairetu1[j] * hairetu2[i][j] hairetu1[j] hairetu1 j hairetu2[i][j] hairetu2[i] hairetu2 i j if(sum > -c){
            count++;
        } sum > -c sum -c c {
            count++;
        } count++ count sum = 0 sum 0 System.out.println(count) System.out.println System.out System System.out count final String[] args args public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







}
} public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();
    int hairetu1[] = new int[m];
    int hairetu2[][] = new int[n][m];
    int count = 0;
    int sum = 0;

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

    for(int i = 0 ; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            hairetu2[i][j] = sc.nextInt();
        }
    }

    for(int i = 0; i < n ; i++){
        for(int j = 0 ; j < m ; j++){
            sum += hairetu1[j] * hairetu2[i][j];
            //System.out.println(sum);
        }
        if(sum > -c){
            count++;
        }
        sum = 0;
    }

    System.out.println(count);







}
}