N,M,K=map(int,input().split()) op,*B=input().split() cnt=0 for i in range(N): A=int(input()) if op=="+": limit_B = K-A else: limit_B = K/A l=filter(lambda x:int(x)>=limit_B,B) cnt+=len(list(l)) print(cnt)