n,m,k = map(int, input().split()) tmp = list(map(str, input().split())) a=[int(input()) for i in range(n)] op=tmp[0] b=[] for num in tmp[1:]: b.append(int(num)) a.sort() b.sort() ans=0 import bisect for i in b: if op=="*": thr=k/i else: thr=k-i ind = bisect.bisect_left(a,thr) ans+= (len(a) - ind) print(ans)