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=='+': for i in range(n): c+=sum([a[i]+x>=k for x in l]) else: for i in range(n): c+=sum([a[i]*x>=k for x in l]) print(c)