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