Bessie the cow likes shiny things, so she mines diamonds in her spare time. She has collected N 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 K. Two diamonds whose sizes differ by exactly K can be displayed together. Given K, find the largest number of diamonds Bessie can put in the case.