Diamond Collector (Bronze)

Choose the largest group of diamonds whose sizes differ by at most K.

Easy3SortingSliding windowInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Bessie the cow likes shiny things, so she mines diamonds in her spare time. She has collected NN diamonds of varying sizes, and she wants to put some of them in a display case in the barn.

The diamonds in the case have to be similar in size, so Bessie will not put two diamonds in the case when their sizes differ by more than KK. Two diamonds whose sizes differ by exactly KK can be displayed together. Given KK, find the largest number of diamonds Bessie can put in the case.

Input

The first line contains NN and KK (1N10001 \le N \le 1000, 0K100000 \le K \le 10000).

Each of the next NN lines contains the size of one diamond. Every size is a positive integer no larger than 1000010000.

Output

Print the largest number of diamonds that Bessie can put in the case, on one line.