There are N pieces of source code. The characteristics of the i-th code is represented by M integers A_{i1}, A_{i2}, ..., A_{iM}.
Additionally, you are given integers B_1, B_2, ..., B_M and C.
The i-th code correctly solves this problem if and only if A_{i1} B_1 + A_{i2} B_2 + ... + A_{iM} B_M + C > 0.
Among the N codes, find the number of codes that correctly solve this problem.

-----Constraints-----
 - All values in input are integers.
 - 1 \leq N, M \leq 20
 - -100 \leq A_{ij} \leq 100
 - -100 \leq B_i \leq 100
 - -100 \leq C \leq 100

-----Input-----
Input is given from Standard Input in the following format:
N M C
B_1 B_2 ... B_M
A_{11} A_{12} ... A_{1M}
A_{21} A_{22} ... A_{2M}
\vdots
A_{N1} A_{N2} ... A_{NM}

-----Output-----
Print the number of codes among the given N codes that correctly solve this problem.

-----Sample Input-----
2 3 -10
1 2 3
3 2 1
1 2 2

-----Sample Output-----
1

Only the second code correctly solves this problem, as follows:
 - Since 3 \times 1 + 2 \times 2 + 1 \times 3 + (-10) = 0 \leq 0, the first code does not solve this problem.
 - 1 \times 1 + 2 \times 2 + 2 \times 3 + (-10) = 1 > 0, the second code solves this problem.

Difficulty: introductory

Starter code:

Solutions:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
r=0
for _ in range(n):
  a=list(map(int,input().split()))
  d=0
  for jj in range(m):
    d+=a[jj]*b[jj]
  if d+c>0:
    r+=1
print(r)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [0]*N
for i in range(N):
    A[i] = [ int(j) for j in input().split() ]

cnt = 0
for i in range(N):
    pm = C
    for j in range(M):
        pm += A[i][j]*B[j]
    if pm > 0:
        cnt += 1

print(cnt)

ans = 0
n, m, c = list(map(int, input().split()))
b = list(map(int, input().split()))

for i in range(n):
    a = list(map(int, input().split()))
    tmp = sum([a_ * b_ for (a_, b_) in zip(a, b)]) + c
    if tmp > 0:
        ans += 1

print(ans)


N,M,C=list(map(int, input().split()))
B=list(map(int, input().split()))

ans=0

for _ in range(N):
	A=list(map(int, input().split()))
	temp=C
	for a,b in zip(A,B):
		temp+=a*b
	if temp>0:
		ans+=1

print(ans)


N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]

cnt = 0
for n in range(N):
    value = 0
    for m in range(M):
        value += A[n][m]*B[m]
    value += C
    if value > 0:
        cnt += 1

print(cnt)


n,m,c = map(int, input().split())
b = list(map(int, input().split()))
count = 0
for i in range(n):
    s = 0
    a = list(map(int, input().split()))
    for x in range(m):
        s += a[x]*b[x]
    s += c
    if s > 0:
        count += 1
print(count)

n,m,c = map(int,input().split())
 
b = [int(x) for x in input().split()]
cnt = 0
for i in range(n):
    a = [int(x) for x in input().split()]
    ans = c
    for j in range(m):
        ans += (a[j]*b[j])
    if(ans > 0):
        cnt += 1
 
print(cnt)

N,M,C = map (int, input ().split ())
ans = 0
B = [int (x) for x in input().split()]
for i in range (N):
  K = 0
  A = [int (x) for x in input().split()]
  for j in range (M):
    K += (A[j])*(B[j])
  if K+C > 0:
    ans += 1
print (ans)

n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans = 0
for i in range(n):
  a = list(map(int,input().split()))
  cnt = 0
  for j in range(m):
    cnt += a[j]*b[j]
  if cnt + c > 0:
    ans += 1
print(ans)

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
cnt = 0
for i in range(n):
    ac = 0
    a = list(map(int, input().split()))
    for j in range(m):
        ac += a[j] * b[j]
    if ac+c > 0:
        cnt += 1
print(cnt)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
count = 0
for n in range(N):
    A = list(map(int, input().split()))
    total = C
    for i ,j in zip(B, A):
        total += i * j
    if total > 0:
        count += 1
print(count)

n,m,c=list(map(int,input().split()))
b=list(map(int,input().split()))

cnt=0
for _ in range(n):
    sum=c
    a=list(map(int,input().split()))
    for i in range(m):
        sum+=a[i]*b[i]

    if sum>0:
        cnt+=1

print(cnt)


N, M, C, = map(int, input().split())
B = list(map(int, input().split()))
A = [tuple(map(int, input().split())) for _ in range(N)]

cnt = 0
for a in range(N):
    math_list = []
    for b in range(M):
        math_list.append(A[a][b] * B[b])
    if sum(math_list) + C > 0:
        cnt += 1

print(cnt)

n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[list(map(int,input().split())) for _ in range(n)]
ans=0
sum_tmp=0
for i in range(n):
    for j in range(m):
        sum_tmp+=a[i][j]*b[j]
    else:
        if sum_tmp+c>0:
            ans+=1
        sum_tmp=0
print(ans)

n,m,c=list(map(int, input().split()))
b=[int(i) for i in input().split()]

count=0
for i in range(n):
    a=[int(i) for i in input().split()]
    sum=c
    for j in range(m):
        sum+=a[j]*b[j]
    
    if sum>0:
        count+=1
        
print(count)


n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans = 0
for i in range(n):
  a = list(map(int,input().split()))
  x = c
  for j in range(m):
    x += a[j]*b[j]
  if x > 0:
    ans += 1
print(ans)

n, m, c = map(int, input().split())
list01 = list(map(int, input().split()))
a = 0
b = 0
for i in range(n):
    list02 = list(map(int, input().split()))
    for j in range(m):
        a += list02[j] * list01[j]
    if a + c > 0:
        b += 1
        a = 0
    else:
        a = 0
print(b)

#!/usr/local/bin/python3
# https://atcoder.jp/contests/abc121/tasks/abc121_b

N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = []
for _ in range(N):
    A.append(list(map(int, input().split())))

ans = 0

for i in range(N):
    y = 0
    for j in range(M):
        y += A[i][j]*B[j]
    y += C

    if y > 0:
        ans += 1

print(ans)


n,m,c = list(map(int,input().split()))
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

ans = 0
for i in range(n):
    count = c
    for j in range(m):
        count += b[j]*a[i][j]
    if count > 0 :
        ans += 1

print(ans)


n,m,c = map(int,input().split())
b = list(map(int,input().split()))
a = []
cnt = 0

for i in range(n):
    a.append(list(map(int,input().split())))
    tmp = 0
    for j in range(m):
        tmp += a[i][j]*b[j]
    if tmp + c > 0 :
        cnt += 1

print(cnt)

N,M,C = list(map(int, input().split()))
B = list(map(int,input().split()))
ans = 0
for i in range(N):
  A = list(map(int,input().split()))
  sum = 0
  for j in range(M):
    sum += A[j] * B[j]
  if sum > -C:
    ans += 1
print(ans)


code_number, characteristic_code, integer3 = map(int, input().split())
integer2 = list(map(int, input().split()))
integer1 = [list(map(int, input().split())) for i in range(code_number)]
solution = 0
for i in range(code_number):
    multiplication = integer3
    for j in range(characteristic_code):
        multiplication += integer2[j] * integer1[i][j]
    if multiplication > 0:
        solution += 1
print(solution)

n,m,c=map(int,input().split())
B=list(map(int,input().split()))
A=[list(map(int,input().split())) for i in range(n)]
ans=0
for a in A:
  s=c
  for i in range(m):
    s += a[i]*B[i]
  if s>0:
    ans += 1
print(ans)

#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    n,m,c = map(int,input().split())
    base_data=[]
    source_codes=[]
    base_data=list(map(int,input().split()))
    source_codes=[list(map(int,input().split())) for _ in range(n)]
    ans=0
    cnt=0

    for i in range(n):
        for j in range(m):
            ans+=source_codes[i][j]*base_data[j]
        ans=ans+c
        if ans > 0:
            ans=0
            cnt+=1
        else:
            ans=0
            continue
    
    print(cnt)    
    
def __starting_point():
    main()
__starting_point()

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for i in range(n):
    s = 0
    for j in range(m):
        s += a[i][j] * b[j]
    if s + c > 0:
        ans += 1
print(ans)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = []
for i in range(N):
  A.append(list(map(int, input().split())))

cnt = 0
for i in range(N):
  pro = C
  for j in range(M):
    pro += A[i][j] * B[j]
  if pro > 0:
    cnt += 1
print(cnt)

def main():
    n, m, c = list(map(int, input().split()))
    b = list(map(int, input().split()))
    a = []

    cnt = 0
    for i in range(n):
        a.append(list(map(int, input().split())))

    for i in range(n):
        ans = 0
        for k in range(m):
            ans += a[i][k] * b[k]
        if ans + c > 0:
            cnt += 1
    print(cnt)


def __starting_point():
    main()

__starting_point()

def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n, m, c = Input()
    b = Input()
    a = [Input() for _ in range(n)]
    ans = 0
    for row in a:
        tmp = c
        for x, y in zip(row, b):
            tmp += x * y
        if tmp > 0:
            ans += 1
    print(ans)

main()

n, m, c = map(int, input().split())
base_list = list(map(int, input().split()))
double_lists = []
calc_sum = 0
ans = 0

for _ in range(n):
    a = list(map(int, input().split()))
    double_lists.append(a)

for i in double_lists:
    for index, j in enumerate(i):
        calc_sum += j * base_list[index]
    if calc_sum + c > 0:
        ans += 1
    calc_sum = 0

print(ans)

N,M,C=list(map(int,input().split()))
ans=0
B=list(map(int,input().split()))

for i in range(N):
    A=list(map(int,input().split()))
    s=C
    for j in range(M):
        s+=A[j]*B[j]
    if s>0:
        ans+=1

print(ans)


n,m,c = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = 0
for i in range(n):
    tmp = 0
    a = list(map(int,input().split()))
    for j in range(m):
        tmp+=a[j]*b[j]
    if tmp+c>0 :
        ans+=1

print(ans)


a = [int(c) for c in input().split()]
N = a[0]
M = a[1]
C = a[2]
B = [int(c) for c in input().split()]
A = [list(map(int,input().split())) for c in range(N)]

result = []

for i in range(N):
    cnt = C
    for j in range(M):
        cnt += A[i][j]*B[j]
    
    if cnt > 0:
        result.append(1)
    else:
        result.append(0)

print(sum(result))

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]

ans =0
for i in range(n):
    if sum([a[i][j]*b[j] for j in range(m)]) + c > 0:
        ans += 1
print(ans)

import numpy as np
n,m,c = list(map(int,input().split()))
b = list(map(int,input().split()))
b = np.array(b)
k = 0
for i in range(n):
    a = list(map(int,input().split()))
    a = np.array(a)
    ans = np.dot(a,b)
    if ans  +c > 0:
        k +=1
print(k)


n, m, c = list(map(int, input().split(" ")))
b_arr = list(map(int, input().split(" ")))
ans = 0
a_arr = []
for _ in range(n):
    a_arr = list(map(int, input().split(" ")))
    sum_num = c

    for i in range(m):
        sum_num += a_arr[i] * b_arr[i]

    if sum_num > 0:
        ans += 1
print(ans)


#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))
  
n,m,c=input2()
B=input_array()
A=[input_array() for _ in range(n)]

count=0

for a in A:
	tmp=c
	for i in range(m):
		tmp+=a[i]*B[i]

	if tmp>0:
		count+=1
print(count)

n,m,c=map(int,input().split())  
b =list(map(int, input().split()))
cnt = 0
for i in range(n):
    s = 0
    a =list(map(int, input().split()))
    for j in range(m):
        s += a[j]*b[j]
    if s +c > 0:
        cnt +=1
print(cnt)

N,M,C=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
for _ in range(N):
    A=list(map(int,input().split()))
    x=C
    for i in range(M):
        x+=A[i]*B[i]
    if x>0:
        ans+=1
print(ans)


N, M, C = map(int, input().split())
B = list(map(int, input().split()))

count = 0

for i in range(0, N):
    A = list(map(int, input().split()))
    answer = 0
    for j in range(0, M):
        answer += A[j] * B[j]
    answer += C
    if answer > 0:
        count += 1

print(count)

n, m, c = map(int, input().split())
b = [int(i) for i in input().split()]
a = [[int(i) for i in input().split()] for j in range(n)]

answer = 0
for i in range(n):
    x = 0
    for j in range(len(a[i])):
        x += a[i][j] * b[j]
    x += c
    if x > 0:
        answer += 1
print(answer)

import numpy as np
# import math

# from scipy.special import perm
# from scipy.special import comb

# from numba import njit
# @njit('f8(i8,i8,i8,i8,f8[:,:,:])', cache=True)

def lcm(a, b):
    return a*b//math.gcd(a, b)

MOD = 10**9+7

n ,m, c = list(map(int, input().split()))

B = np.zeros(m)
A = np.zeros((n, m))


B = np.array(list(map(int, input().split())))

for i in range(n):
    A[i] = list(map(int, input().split()))

cnt = 0
for i in range(n):
    if np.dot(A[i],B)+c > 0:
        cnt += 1
print(cnt)


n, m, c = list(map(int, input().split()))
base_list = list(map(int, input().split()))
double_lists = []
calc_sum = 0
ans = 0

for _ in range(n):
    a = list(map(int, input().split()))
    double_lists.append(a)

for i in double_lists:
    for index, j in enumerate(i):
        calc_sum += j * base_list[index]
    if calc_sum + c > 0:
        ans += 1
    calc_sum = 0

print(ans)


N, M, C = map(int, input().split())
lists_B = list(map(int, input().split()))
lists_A = []
for _ in range(1, N + 1):
    lists_A.append(input().split())

SUM = 0
result = 0

for i in range(0, N):
    for j in range(0, M):
        SUM += int(lists_A[i][j]) * lists_B[j]

    if SUM + C > 0:
        result += 1

    SUM = 0

print(result)

n,m,c=map(int,input().split())
co=0
b=list(map(int,input().split()))
for i in range(n):
  a=list(map(int,input().split()))
  s=0
  #co=0
  for i in range(len(a)):
    s+=(a[i]*b[i])
  res=(s+c)
  if res>0:
    co+=1
print(co)

N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
for i in range(N):
  temp = C
  A = list(map(int, input().split()))
  for i in range(M):
    temp += (A[i] * B[i])
  if temp > 0:
    ans += 1
print(ans)


n, m, c = map(int, input().split())
b = list(map(int, input().split()))
e = 0
for i in range(n):
  a = list(map(int, input().split()))
  d = 0
  for i in range(len(b)):
    d = a[i]*b[i] + d
  if d+c > 0:
    e = e+1
print(e)

n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans = 0
for i in range(n):
    temp = 0
    a = list(map(int,input().split()))
    for j in range(m):
        temp += a[j]*b[j]
    if temp + c > 0:
        ans += 1
        
print(ans)

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for i in range(n):
    sum = 0

    for j in range(m):
        sum += a[i][j] * b [j]

    if sum + c > 0:
        ans += 1


print(ans)

N,M,C=map(int,input().split())
B=list(map(int,input().split()))
A=[list(map(int,input().split())) for _ in range(N)]

ans=0
for i in range(N):
    tmp=0
    for a,b in zip(A[i],B):
        tmp+=a*b
    tmp+=C
    if tmp>0: ans+=1
print(ans)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))

code_count = 0
answer = 0

while N > code_count:
    A = list(map(int, input().split()))
    sum = C
    for i in range(M):
        sum += A[i] * B[i]
    if sum > 0:
        answer += 1
    code_count += 1

print(answer)

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
d = 0
for i in range(n):
    a = list(map(int, input().split()))
    e = []
    for j in range(m):
        e.append(a[j] * b[j])
    e.append(c)
    if sum(e) > 0:
        d += 1
print(d)

N, M, C = list(map(int, input().split()))
B = [int(i) for i in input().split()]

cnt = 0

for i in range(N):
    A = [int(i) for i in input().split()]
    sum = C
    for j in range(M):
        sum += A[j] * B[j]
        j += 1
    if sum > 0:
        cnt += 1
    i += 1

print(cnt)


a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = []
ans = 0
e = 0
for i in range(a[0]):
  d = list(map(int,input().split()))
  c .append(d)
for i in c:
  for j in range(a[1]):
    e += b[j]*i[j]
    
  if e + a[2] > 0:
    ans += 1
  e = 0
print(ans)
  



N, M, C = list(map(int, input().split()))

B = list(map(int, input().split()))

ans = 0
for n in range(N):
    A = list(map(int, input().split()))
    c = 0
    for m in range(M):
        c += A[m]*B[m]
    c += C
    if c > 0:
        ans += 1
print(ans)


n, m, c = map(int,input().split())
b = list(map(int,input().split()))
ans = 0

for i in range(n):
  a = list(map(int,input().split()))
  count = 0
  for j in range(m):
    count += b[j]*a[j]
  if count+c > 0:
      ans += 1
print(ans)

import numpy as np

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
b = np.array(b)
tot = 0

for _ in range(n):
    a = list(map(int, input().split()))
    a = np.array(a)
    if np.dot(a, b) + c > 0:
        tot += 1

print(tot)

n, m, c = map(int, input().split())

b = [int(x) for x in input().split()]
ans = 0
for i in range(n):
    a = [int(x) for x in input().split()]
    cnt = c
    for aa, bb in zip(a, b):
        cnt += aa * bb
    if cnt > 0: ans += 1
print(ans)

N,M,C=list(map(int,input().split()))
B=list(map(int,input().split()))

ans=0

for i in range(N):
    A=list(map(int,input().split()))
    S=0
    for j in range(M):
        S+=A[j]*B[j]
    if S>-C:
        ans+=1
            
        
print(ans)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for i in range(N):
    tmp = 0
    A = list(map(int, input().split()))
    for j in range(M):
        tmp += A[j]*B[j]
    if tmp+C > 0:
        ans += 1

print(ans)

n,m,c = map(int,input().split())

b = [int(x) for x in input().split()]
cnt = 0
for i in range(n):
    a = [int(x) for x in input().split()]
    ans = c
    for j in range(m):
        ans += (a[j]*b[j])
    if(ans > 0):
        cnt += 1

print(cnt)

from typing import List


def judge(c: int, m: int, b: List[int], a: List[int]) -> bool:
    result = c
    for i in range(m):
        result += a[i] * b[i]

    return 0 < result


def answer(n: int, m: int, c: int, b: List[int], a: List[List[int]]) -> int:
    count = 0
    for i in range(n):
        if judge(c, m, b, a[i]):
            count += 1

    return count


def main():
    n, m, c = list(map(int, input().split()))
    b = list(map(int, input().split()))
    a = [list(map(int, input().split())) for _ in range(n)]

    print((answer(n, m, c, b, a)))


def __starting_point():
    main()

__starting_point()

N, M, C = map(int, input().split())

B = list(map(int, input().split()))

cnt = 0
for n in range(N):
    A = list(map(int, input().split()))

    total = C
    for i, j in zip(B, A):
        total += i * j

    if total > 0:
        cnt += 1

print(cnt)

import sys
import numpy as np
input = sys.stdin.readline
N,M,C = list(map(int,input().split()))
B = np.array(list(map(int,input().split())))
def main():
  count = 0
  for i in range(N):
    A = np.array(list(map(int,input().split())))
    if sum(A*B) + C > 0:
      count += 1
  return count

def __starting_point():
  print((main()))

__starting_point()

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for i in range(N):
  A = list(map(int, input().split()))
  tmp = 0
  for j in range(M):
    tmp += A[j] * B[j]
  if tmp > -C:
    ans += 1
print(ans)

from operator import mul
ans = 0

N, M, C = map(int, input().split())
X = [list(map(int, input().split())) for i in range(N + 1)]

for i in range(N):  
  num = list(map(mul, X[0],X[i+1]))
  add = sum(num) + C
  if add > 0:
    ans += 1

print(ans)

n,m,c=map(int, input().split())
b=list(map(int, input().split()))
cnt=0
for i in range(n):
  pro=c
  a=list(map(int, input().split()))
  for j in range(m):
    pro+=a[j]*b[j]
  if pro>0:
      cnt+=1
print(cnt)

n, m, c = list(map(int, input().split()))
b = list(map(int,input().split()))

cnt = 0
for i in range(n):
    a = list(map(int, input().split()))
    cntt=0
    for j in range(m):
        cntt += a[j]*b[j]
    if cntt+c > 0:
        cnt += 1

print(cnt)  


N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]

ans = 0
for i in range(N):
  s = C
  for j in range(M):
    s += A[i][j]*B[j]
  if s>0: ans += 1
    
print(ans)

import numpy as np

n, m, c = map(int, input().split())
b = np.array(list(map(int, input().split())))

cnt = 0
for _ in range(n):
    a = np.array(list(map(int, input().split())))
    if sum(a * b) + c > 0:
        cnt += 1

print(cnt)

n,m,c = map(int,input().split())
b = list(map(int,input().split()))
answer = 0
memo = 0
for i in range(n):
  a = list(map(int,input().split()))
  for j in range(m):
    memo += a[j]*b[j]
  memo +=c
  if(memo >0):
    answer +=1
  memo = 0
print(answer)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))

# N個のソースコードのうち、この問題に正答するソースコードの個数を出力

count = 0

for N in range(N):
    A = list(map(int, input().split()))
    culc = list()
    culc.append(C)

    for i in range(M):
        d = B[i] * A[i]
        culc.append(d)

    if sum(culc) > 0:
        count += 1

print(count)

n, m, c = (int(i) for i in input().split())
list_b = [int(i) for i in input().split()]
list_a = [[int(i) for i in input().split()] for j in range(0, n)]
count = 0
tmp = 0
for i in range(0, n):
    for j in range(0, m):
        tmp += list_b[j] * list_a[i][j]
    tmp += c
    if tmp > 0: count += 1
    tmp = 0
print(count)

N, M, C = map(int, input().split())
B = list(map(int, input().split()))

code_count = 0
answer = 0

while N > code_count:
    A = list(map(int, input().split()))
    sum = C
    for i in range(M):
        sum += A[i] * B[i]
    if sum > 0:
        answer += 1
    code_count += 1

print(answer)

n,m,c=map(int,input().split())
b=list(map(int, input().split()))
a=[list(map(int,input().split())) for i in range(n)]
count=0
for i in range(n):
  sum=c
  for j in range(m):
    sum+=b[j]*a[i][j]
  if sum>0:
    count+=1
print(count)

import numpy as np
n,m,c=map(int, input().split())
b=np.array(list(map(int, input().split())))
cnt=0
for i in range(n):
    a=np.array(list(map(int, input().split())))
    if np.dot(a,b)+c>0:
        cnt+=1
print(cnt)

N,M,C=map(int,input().split())
B=list(map(int,input().split()))
x=0
for i in range(N):
    A=list(map(int,input().split()))
    s=C
    for j in range(M):
        s+=A[j]*B[j]
    if s>0:
        x+=1
print(x)  

n, m, c = map(int, input().split())

b = list(map(int, input().split()))
count = 0

for i in range(n):
  sum = 0
  a = list(map(int, input().split()))
  for j in range(len(b)):
    sum = sum + b[j]*a[j]
  sum = sum + c
  if sum > 0:
    count = count + 1 

print(count)

N,M,C = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
for i in range(N):
  A = list(map(int,input().split()))
  tmp = 0
  for j in range(M):
    tmp += A[j]*B[j]
  if tmp + C > 0:
    ans += 1
print(ans)


import numpy as np
N,M,C=map(int,input().split())
B=np.array(list(map(int,input().split())))
ans = 0
for _ in range(N):
    A = np.array(list(map(int,input().split())))
    if np.sum(A*B)+C > 0:
        ans += 1
print(ans)

N, M, C = map(int, input().split())
base_list = list(map(int, input().split()))
multi = 0
ans = 0

for i in range(N):
    second_list = list(map(int, input().split()))
    for j in range(M):
        multi += base_list[j] * second_list[j]
    if multi + C > 0:
        ans += 1
        multi = 0
    else:
        multi = 0

print(ans)

N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for i in range(N)]
S = 0
for i in range(N):
    AB = 0
    for j in range(len(B)):
        AB += B[j] * A[i][j]
    if AB + C > 0:
        S += 1
print(S)


n,m,c = map(int, input().split())
bl = list(map(int, input().split()))

res = 0

for i in range(n):
    al = list(map(int, input().split()))
    temp = c
    for j in range(m):
        temp += al[j]*bl[j]
    if temp >0:
        res +=1
        
print(res)

n, m, c = map(int, input().split())
b = [int(i) for i in input().split()]
a = [[int(i) for i in input().split()] for j in range(n)]

answer = 0
for i in range(n):
        x = 0
        for j in range(len(a[i])):
                x += a[i][j] * b[j]
        x += c
        if x > 0:
                answer += 1
print(answer)

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]
ans = []
val = 0
for arr in a:
    for s in range(m):
        val += arr[s]*b[s]
        if s == m-1:
            ans.append(val)
            val = 0
ans = list(map(lambda x: x + c, ans))
print(sum(l > 0 for l in ans))

N, M, C = map(int, input().split())
B = list(map(int, input().split()))

count = 0

for n in range(N):
    A = list(map(int, input().split()))
    culc = list()
    culc.append(C)
    
    for i in range(M):
        d = B[i] * A[i]
        culc.append(d)
        
    if sum(culc) > 0:
        count += 1

print(count)

n, m, c = list(map(int, input().split()))
arr = list(map(int, input().split()))
count2 = 0
for _ in range(n):
    count = 0
    arr2 = list(map(int, input().split()))
    for k, kk in zip(arr2, arr):
        count += k * kk
    if count + c > 0:
        count2 += 1
print(count2)


n,m,c = list(map(int, input().split()))
b = list(map(int, input().split()))
a = []
d = 0
for i in range(n):
    a.append(list(map(int, input().split())))
    combined1 = [x * y for (x, y) in zip(a[i], b)]
    if sum(combined1) + c > 0:
        d += 1

print(d)



# ABC121
# B Can you solve this?
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
ans = 0
ANS = []
ct = 0
for i in range(N):
    for j in range(M):
        ans += A[i][j] * B[j]
        if j == M-1:
            ANS.append(ans)
            ans = 0
for x in ANS:
    if x + C > 0:
        ct += 1
print(ct)


n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for l in range(n)]
ans = 0
for i in range(n):
    sum = c
    for j in range(m):
        sum += b[j]*a[i][j]
    if(sum > 0):
        ans = ans + 1
print(ans)

n, m, c = map(int,input().split())
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]
count = 0
tmp = 0
for i in range(n):
    for j in range(m):
        tmp += a[i][j] * b[j]
    count += 1 if tmp + c > 0 else 0
    tmp = 0
print(count)

N,M,C = map(int,input().split())
BM = list(map(int,input().split()))
ANM = [list(map(int,input().split())) for _ in range(N)]

class Answer:
    def __init__(self,N,M,C,BM,ANM):
        self.N = N
        self.M = M
        self.C = C
        self.BM = BM
        self.ANM = ANM
    
    def result(self):
        ans = 0
        for i in range(N):
            cnt = C
            for j in range(M):
                cnt += BM[j] * ANM[i][j]
            if cnt > 0 :
                ans += 1
        print(ans)
        

info = Answer(N,M,C,BM,ANM)
info.result()

n,m,c=list(map(int,input().split()))
B=list(map(int,input().split()))

cut = 0
for i in range(n):
	A = list(map(int,input().split()))
	ans = 0
	for i in range(m):
		ans += A[i]*B[i]
	if ans  > -c:
		cut += 1

print(cut)


N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
print((sum(sum(i * j for i, j in zip(list(map(int, input().split())), B)) > -C for k in range(N))))


N,M,C=list(map(int,input().split()))
B=input()
A=[input() for i in range(N)]

def ans121(N:int, M:int, C:int, B:str, A:list):
    B=list(map(int,B.split()))
    judge_count=0
    for i in range(N):
        A_list=list(map(int,A[i].split()))#N回検証を繰り返す
        math_count=0
        for j in range(M):#リストの中の要素Mの数だけB[j]*A_list[j]を繰り返し足していく
           math_count+=B[j]*A_list[j]
        if math_count+C>0:
           judge_count+=1
    return judge_count

print((ans121(N,M,C,B,A)))


n, m, c = list(map(int, input().split()))
b = list(map(int, input().split()))

count = 0
for i in range(n):
    total = c
    a = list(map(int, input().split()))
    for j in range(m):
        total += a[j] * b[j]
    if total > 0:
        count += 1
print(count)


n, m, c = map(int, input().split())
b = list(map(int, input().split()))

ans = 0
for i in range(n):
    a = list(map(int, input().split()))
    if sum([a[i] * b[i] for i in range(m)]) + c > 0:
        ans += 1
print(ans)

n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[list(map(int,input().split())) for _ in range(n)]

cnt=0
sum=0

for i in range(m):
  for j in range(n):
    sum+=b[i]*a[j][i]

for j in range(n):
  sum=0
  for i in range(m):
    sum+=b[i]*a[j][i]
  if sum+c>0:
    cnt+=1
  
print(cnt) 

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for i in range(N)]
S = 0
for i in range(N):
    AB = 0
    for j in range(len(B)):
        AB += B[j] * A[i][j]
        j += 1
    if AB+C > 0:
        S += 1
    i += 1
print(S)

N, M, C = map(int,input().split())
list_b = list(map(int, input().split()))

ans = 0

for i in range(N):
    temp = 0
    list_a = list(map(int,input().split()))
    
    for j in range(M):  # j は i 番目の要素の中の j 番目の要素
        temp += list_a[j] * list_b[j]
        
    if temp + C > 0:
        ans += 1

print(ans)

n,m,c = map(int,input().split())
b = list(map(int,input().split()))
li = [list(map(int,input().split())) for i in range(n)]

cnt = 0
su = 0
for i in range(n):
    for j in range(m):
        su += li[i][j]*b[j]

    if su + c > 0:
        cnt += 1
    su = 0
print(cnt)