a, lins = input().split()
coordinates = list(map(int, input().split()))
spaces = [0 for x in range(int(a))]

for i in range(int(a)):
    for j in range(int(a)):
        if abs(coordinates[i] - coordinates[j]) > int(lins):
            spaces[i]+=1
dif = sum(spaces)/len(spaces)
if dif >int(dif)+0.5:
    print(int(dif)+1)
else:
    print(int(dif))
