n,m,k=map(int,input().split()) o,*l=input().split() l=[int(x) for x in l] a=[int(input()) for _ in [0]*n] c=0 if o=='+': l=[k-x for x in l] else: l=[k/x for x in l] for i in range(n): c+=sum([a[i]>=x for x in l]) print(c)