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