import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  }
  public static int[][] multArray(int a[][], int b[][]){
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  }
  public static int[][] multArray(int a[][], int b[][]){
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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[][] A = new int[N][M]; A new int[N][M] N M int[][] B = new int[M][1]; B new int[M][1] M 1 for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    } int i=0; int i=0; i 0 i<M i M i++ i++ i {
      B[i][0] = sc.nextInt();
    } {
      B[i][0] = sc.nextInt();
    } B[i][0] = sc.nextInt() B[i][0] B[i] B i 0 sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[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++){
        A[i][j] = sc.nextInt();
      }
    } {
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    } for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      } int j=0; int j=0; j 0 j<M j M j++ j++ j {
        A[i][j] = sc.nextInt();
      } {
        A[i][j] = sc.nextInt();
      } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc int[][] ansMat = new int[M][1]; ansMat new int[M][1] M 1 ansMat = multArray(A,B) ansMat multArray(A,B) multArray A B int count = 0; count 0 for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      if(ansMat[i][0]>-C){
        count++;
      }
    } {
      if(ansMat[i][0]>-C){
        count++;
      }
    } if(ansMat[i][0]>-C){
        count++;
      } ansMat[i][0]>-C ansMat[i][0] ansMat[i] ansMat i 0 -C C {
        count++;
      } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static int[][] multArray(int a[][], int b[][]){
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  } multArray {
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  } int ay = a.length; ay a.length a a.length int ax = a[0].length; ax a[0].length a[0] a 0 a[0].length int by = b.length; by b.length b b.length int bx = b[0].length; bx b[0].length b[0] b 0 b[0].length int[][] c = new int[ay][bx]; c new int[ay][bx] ay bx if(ax!=by){
      return c;
    } ax!=by ax by {
      return c;
    } return c; c for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    } int i=0; int i=0; i 0 i<ay i ay i++ i++ i {
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    } {
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    } for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      } int j=0; int j=0; j 0 j<bx j bx j++ j++ j {
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      } {
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      } int sum = 0; sum 0 for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        } int k=0; int k=0; k 0 k<ax k ax k++ k++ k {
          sum += a[i][k]*b[k][j];
        } {
          sum += a[i][k]*b[k][j];
        } sum += a[i][k]*b[k][j] sum a[i][k]*b[k][j] a[i][k] a[i] a i k b[k][j] b[k] b k j c[i][j] = sum c[i][j] c[i] c i j sum return c; c int a[][] a int b[][] b public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  }
  public static int[][] multArray(int a[][], int b[][]){
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  }
  public static int[][] multArray(int a[][], int b[][]){
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // H,W,h,wを取得
    int N = sc.nextInt(); //列数
    int M = sc.nextInt(); //行数
    int C = sc.nextInt(); //const
    int[][] A = new int[N][M];
    int[][] B = new int[M][1];
    for(int i=0;i<M;i++){
      B[i][0] = sc.nextInt();
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        A[i][j] = sc.nextInt();
      }
    }
    // 行列計算
    int[][] ansMat = new int[M][1];
    ansMat = multArray(A,B);
    // -c以上の数だけインクリメント
    int count = 0;
    // System.out.println(ansMat.length+" "+ansMat[0].length);
    for(int i=0;i<N;i++){
      if(ansMat[i][0]>-C){
        count++;
      }
    }
    // 出力
    System.out.println(count);
  }
  public static int[][] multArray(int a[][], int b[][]){
    int ay = a.length;
    int ax = a[0].length;
    int by = b.length;
    int bx = b[0].length;
    int[][] c = new int[ay][bx];
    if(ax!=by){
      return c;
    }
    // 行列積
    for(int i=0;i<ay;i++){
      for(int j=0;j<bx;j++){
        int sum = 0;
        for(int k=0;k<ax;k++){
          sum += a[i][k]*b[k][j];
        }
        c[i][j] = sum;
      }
    }
    return c;
  }
}
