using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static B.MyUtil;

namespace B
{
	internal class Program
	{
		public static void Main(string[] args)
		{
			int n, m, c;
			Input(out n, out m, out c);
			var bm = InIntArray;
			var result = 0;
			for (var i = 0; i < n; i++)
			{
				var am = InIntArray;
				var tmp = 0;
				for (var j = 0; j < m; j++) { tmp += am[j] * bm[j]; }

				tmp += c;
				if (tmp > 0) { result++; }
			}

			Console.WriteLine(result);
		}
	}

	public static class MyUtil
	{
		/**************************************************
		 * 入力
		 **************************************************/

		public static string InString => Console.ReadLine().Trim();
		public static int InInt => int.Parse(InString);
		public static long InLong => long.Parse(InString);
		public static double InDouble => double.Parse(InString);
		public static char InChar => char.Parse(InString);

		public static IEnumerable<string> InStrings =>
			InString.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

		public static IEnumerable<int> InInts => InStrings.Select(int.Parse);
		public static IEnumerable<long> InLongs => InStrings.Select(long.Parse);
		public static IEnumerable<double> InDoubles => InStrings.Select(double.Parse);
		public static IEnumerable<char> InChars => InStrings.Select(char.Parse);

		public static string[] InStringArray => InStrings.ToArray();
		public static int[] InIntArray => InInts.ToArray();
		public static long[] InLongArray => InLongs.ToArray();
		public static double[] InDoubleArray => InDoubles.ToArray();
		public static char[] InCharArray => InChars.ToArray();

		public static List<string> InStringList => InStrings.ToList();
		public static List<int> InIntList => InInts.ToList();
		public static List<long> InLongList => InLongs.ToList();
		public static List<double> InDoubleList => InDoubles.ToList();
		public static List<char> InCharList => InChars.ToList();

		public static void Input<T>(out T variable) { variable = ChangeValue<T>(InString); }

		public static void Input<T1, T2>(out T1 variable1, out T2 variable2)
		{
			var ary = InStringArray;
			variable1 = ChangeValue<T1>(ary[0]);
			variable2 = ChangeValue<T2>(ary[1]);
		}

		public static void Input<T1, T2, T3>(out T1 variable1, out T2 variable2, out T3 variable3)
		{
			var ary = InStringArray;
			variable1 = ChangeValue<T1>(ary[0]);
			variable2 = ChangeValue<T2>(ary[1]);
			variable3 = ChangeValue<T3>(ary[2]);
		}

		public static void Input<T1, T2, T3, T4>(out T1 variable1, out T2 variable2, out T3 variable3, out T4 variable4)
		{
			var ary = InStringArray;
			variable1 = ChangeValue<T1>(ary[0]);
			variable2 = ChangeValue<T2>(ary[1]);
			variable3 = ChangeValue<T3>(ary[2]);
			variable4 = ChangeValue<T4>(ary[3]);
		}

		public static void Input<T1, T2, T3, T4, T5>(out T1 variable1,
		                                             out T2 variable2,
		                                             out T3 variable3,
		                                             out T4 variable4,
		                                             out T5 variable5)
		{
			var ary = InStringArray;
			variable1 = ChangeValue<T1>(ary[0]);
			variable2 = ChangeValue<T2>(ary[1]);
			variable3 = ChangeValue<T3>(ary[2]);
			variable4 = ChangeValue<T4>(ary[3]);
			variable5 = ChangeValue<T5>(ary[4]);
		}

		public static void Input<T1, T2, T3, T4, T5, T6>(out T1 variable1,
		                                                 out T2 variable2,
		                                                 out T3 variable3,
		                                                 out T4 variable4,
		                                                 out T5 variable5,
		                                                 out T6 variable6)
		{
			var ary = InStringArray;
			variable1 = ChangeValue<T1>(ary[0]);
			variable2 = ChangeValue<T2>(ary[1]);
			variable3 = ChangeValue<T3>(ary[2]);
			variable4 = ChangeValue<T4>(ary[3]);
			variable5 = ChangeValue<T5>(ary[4]);
			variable6 = ChangeValue<T6>(ary[5]);
		}

		/**************************************************
		 * 出力
		 **************************************************/

		public static StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };

		public static void Print(string output) { sw.WriteLine(output); }

		public static void Print<T>(IEnumerable<T> outputs) { Print(string.Join(" ", outputs)); }

		public static void Print(params object[] outputs) { Print(string.Join(" ", outputs)); }


		/**************************************************
		 * 中間メソッド
		 **************************************************/

		private static bool IsEqualType<T1, T2>() { return typeof(T1) == typeof(T2); }

		private static T1 ChangeType<T1, T2>(T2 src) { return (T1) Convert.ChangeType(src, typeof(T1)); }

		private static T ChangeValue<T>(string s)
		{
			if (IsEqualType<T, int>()) { return ChangeType<T, int>(int.Parse(s)); }

			if (IsEqualType<T, long>()) { return ChangeType<T, long>(long.Parse(s)); }

			if (IsEqualType<T, double>()) { return ChangeType<T, double>(double.Parse(s)); }

			if (IsEqualType<T, char>()) { return ChangeType<T, char>(char.Parse(s)); }

			return ChangeType<T, string>(s);
		}
	}
}

Measured memory_bytes: 13524