eval"N,M,X,*A="+$<.read.split*?, p A.sort!.bsearch{|y|*b=A b.delete_at A.index y (N-3).downto(i=0).count{i+=1while b[i]&.<=X+y-b[_1] _1>=i+=1}