Oh no! A graveyard has appeared and skeletons are attacking Ken's precious tower! More specifically, Ken is under siege for $$$k$$$ $$$(1 \leq k \leq 10^9)$$$ seconds facing a total of $$$n$$$ $$$(1 \leq n \leq 10^5)$$$ skeletons, where skeleton $$$i$$$ will spawn at time $$$a_i$$$. In order to try and defend his tower, Ken can use a powerful snowball, which kills all skeletons that have already spawned at once! However, Ken only has one snowball, so he must choose wisely when to use it!
At each second $$$x$$$ between $$$0 \dots k - 1$$$, the following occurs in order:
Help Ken find the minimum damage that his tower will take after the siege is over across all times at which he can use his snowball.
The first line contains two integers, $$$n$$$ $$$(1 \leq n \leq 10^5)$$$ and $$$k$$$ $$$(1 \leq k \leq 10^9)$$$, where $$$n$$$ is the size of $$$a$$$ and $$$k$$$ is how long the siege lasts for.
The second line contains $$$n$$$ integers, $$$[a_1, a_2, ... a_n]$$$ $$$(0 \leq a_i \leq k - 1)$$$, the times at which each skeleton spawns
Output one number, the minimum damage done to Ken's tower after the siege is over across all times at which he can use his snowball.
2 30 1
1
4 100 9 9 9
3
In the first test case, if Ken uses the snowball at time $$$1$$$, both skeletons have spawned and are thus killed. In total, the skeleton that spawns at time $$$0$$$ does $$$1$$$ damage, and this is all.
In the second test case, if Ken uses the snowball at time $$$0$$$, the first skeleton is killed. The total damage is $$$3$$$, as $$$3$$$ more skeletons spawn in afterwards at time $$$9$$$, but they only have time for one attack before the siege ends.