import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int c = Integer.parseInt(str[2]); c Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 str = in.readLine().split(" ") str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int[] b = new int[m]; b new int[m] m int[][] a = new int[n][m]; a new int[n][m] n m int count = 0; count 0 for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    } int i=0; int i=0; i 0 i<m i m i++ i++ i {
      b[i] = Integer.parseInt(str[i]);
    } {
      b[i] = Integer.parseInt(str[i]);
    } b[i] = Integer.parseInt(str[i]) b[i] b i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } str = in.readLine().split(" ") str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int sum = 0; sum 0 for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      } int j=0; int j=0; j 0 j<m j m j++ j++ j {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      } {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      } a[i][j] = Integer.parseInt(str[j]) a[i][j] a[i] a i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j sum += a[i][j] * b[j] sum a[i][j] * b[j] a[i][j] a[i] a i j b[j] b j if(sum+c>0){
        count+=1;
        sum = 0;
      } sum+c>0 sum+c sum c 0 {
        count+=1;
        sum = 0;
      } count+=1 count 1 sum = 0 sum 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int m = Integer.parseInt(str[1]);
    int c = Integer.parseInt(str[2]);
    str = in.readLine().split(" ");
    int[] b = new int[m];
    int[][] a = new int[n][m];
    int count = 0;
    for(int i=0; i<m; i++) {
      b[i] = Integer.parseInt(str[i]);
    }
    for(int i=0; i<n;i++) {
      str = in.readLine().split(" ");
      int sum = 0;
      for(int j=0; j<m; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        sum += a[i][j] * b[j];
      }
      if(sum+c>0){
        count+=1;
        sum = 0;
      }
    } 
    System.out.println(count);
  }
}