import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int m = scanner.nextInt();
    int c = scanner.nextInt();
    int[] b = new int[m];
    for (int i = 0; i < m; i++) {
      b[i] = scanner.nextInt();
    }
    int[] sum = new int[n];
    for (int i = 0; i < n; i++) {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    }

    int ans = 0;

    for (int i = 0; i < n; i++) {
      if (sum[i] + c > 0)
        ans++;
    }

    System.out.println(ans);

  }

} import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int m = scanner.nextInt();
    int c = scanner.nextInt();
    int[] b = new int[m];
    for (int i = 0; i < m; i++) {
      b[i] = scanner.nextInt();
    }
    int[] sum = new int[n];
    for (int i = 0; i < n; i++) {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    }

    int ans = 0;

    for (int i = 0; i < n; i++) {
      if (sum[i] + c > 0)
        ans++;
    }

    System.out.println(ans);

  }

} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int m = scanner.nextInt();
    int c = scanner.nextInt();
    int[] b = new int[m];
    for (int i = 0; i < m; i++) {
      b[i] = scanner.nextInt();
    }
    int[] sum = new int[n];
    for (int i = 0; i < n; i++) {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    }

    int ans = 0;

    for (int i = 0; i < n; i++) {
      if (sum[i] + c > 0)
        ans++;
    }

    System.out.println(ans);

  } main {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int m = scanner.nextInt();
    int c = scanner.nextInt();
    int[] b = new int[m];
    for (int i = 0; i < m; i++) {
      b[i] = scanner.nextInt();
    }
    int[] sum = new int[n];
    for (int i = 0; i < n; i++) {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    }

    int ans = 0;

    for (int i = 0; i < n; i++) {
      if (sum[i] + c > 0)
        ans++;
    }

    System.out.println(ans);

  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int[] b = new int[m]; b new int[m] m for (int i = 0; i < m; i++) {
      b[i] = scanner.nextInt();
    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      b[i] = scanner.nextInt();
    } {
      b[i] = scanner.nextInt();
    } b[i] = scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner int[] sum = new int[n]; sum new int[n] n for (int i = 0; i < n; i++) {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    } {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    } sum[i] = 0 sum[i] sum i 0 for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        sum[i] += scanner.nextInt() * b[j];
      } {
        sum[i] += scanner.nextInt() * b[j];
      } sum[i] += scanner.nextInt() * b[j] sum[i] sum i scanner.nextInt() * b[j] scanner.nextInt() scanner.nextInt scanner b[j] b j int ans = 0; ans 0 for (int i = 0; i < n; i++) {
      if (sum[i] + c > 0)
        ans++;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      if (sum[i] + c > 0)
        ans++;
    } {
      if (sum[i] + c > 0)
        ans++;
    } if (sum[i] + c > 0)
        ans++; sum[i] + c > 0 sum[i] + c sum[i] sum i c 0 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int m = scanner.nextInt();
    int c = scanner.nextInt();
    int[] b = new int[m];
    for (int i = 0; i < m; i++) {
      b[i] = scanner.nextInt();
    }
    int[] sum = new int[n];
    for (int i = 0; i < n; i++) {
      sum[i] = 0;
      for (int j = 0; j < m; j++) {
        sum[i] += scanner.nextInt() * b[j];
      }
    }

    int ans = 0;

    for (int i = 0; i < n; i++) {
      if (sum[i] + c > 0)
        ans++;
    }

    System.out.println(ans);

  }

}
