const main = (input) => {
  const inputs = input.trim().split('\n');
  const N = Number.parseInt(inputs[0].split(" ")[0]);
  const M = Number.parseInt(inputs[0].split(" ")[1]);
  const C = Number.parseInt(inputs[0].split(" ")[2]);

  var BMap = inputs[1].split(" ");
  var ans = 0;
  for(var i=0;i<N;i++){
    var AMap = inputs[i+2].split(" ");
    if(calc(AMap, BMap)+C>0){
      ans++
    }
  }

  console.log(ans);
}
function calc(amap, bmap){
  var ans = 0;
  for(var i=0;i<amap.length;i++){
    ans += amap[i]*bmap[i];
  }
  return ans;
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));
