import java.util.*

fun main(args:Array<String>){
    val scn= Scanner(System.`in`)
    val n=scn.nextInt()
    val m=scn.nextInt()
    val c=scn.nextInt()
    var b=IntArray(m)
    var a:Int
    var cnt=0
    var sum=0

    for (i in 0 until m){
        b[i]=scn.nextInt()
    }
    for (k in 0 until n) {
        sum=0
        for (j in 0 until m) {
            a = scn.nextInt()
            sum+=a*b[j]
        }
        if (sum>-c) cnt++
    }

    println(cnt)
}