import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  }
} Main public static void main(String[] args) {
    solve(System.in, System.out);
  } main {
    solve(System.in, System.out);
  } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  } solve {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  } Scanner sc = new Scanner(is); sc new Scanner(is) 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[] b = new int[m]; b new int[m] m int[][] a = new int[n][m]; a new int[n][m] n m for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      b[i] = sc.nextInt();
    } {
      b[i] = sc.nextInt();
    } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    } {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    } for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        a[j][i] = sc.nextInt();
      } {
        a[j][i] = sc.nextInt();
      } a[j][i] = sc.nextInt() a[j][i] a[j] a j i sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    } {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    } int sum = c; sum c for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        sum += a[j][i] * b[i];
      } {
        sum += a[j][i] * b[i];
      } sum += a[j][i] * b[i] sum a[j][i] * b[i] a[j][i] a[j] a j i b[i] b i if (sum > 0) {
        count++;
      } sum > 0 sum 0 {
        count++;
      } count++ count os.println(count) os.println os count InputStream is is PrintStream os os public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  }
} public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    int[] b = new int[m];
    int[][] a = new int[n][m];

    for (int i = 0; i < m; i++) {
      b[i] = sc.nextInt();
    }

    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        a[j][i] = sc.nextInt();
      }
    }

    int count = 0;
    for (int j = 0; j < n; j++) {
      int sum = c;
      for (int i = 0; i < m; i++) {
        sum += a[j][i] * b[i];
      }
      if (sum > 0) {
        count++;
      }
    }

    os.println(count);
  }
}