F. Silly Nilly's Stuffies
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Silly Nilly the intelligent robot has just bought a new shelf with $$$L$$$ levels and wants to fill it with stuffed animals. She currently has $$$P$$$ piles of $$$S_i$$$ stuffed animals each, but since she is a perfectionist, Silly Nilly insists that each layer of the shelf must contain the same number of stuffed animals.

Since she has limited mobility as a robot, in one operation, Silly Nilly can either remove a stuffed animal from any pile or add a stuffed animal to any pile (she has more stuffed animals outside of these piles). Determine the minimum number of operations it will take for Silly Nilly to arrange her piles so that any $$$L$$$ piles will have the same number of stuffed animals in them.

Input

Line $$$1$$$: Two integers $$$P$$$ and $$$L$$$

Line $$$2$$$: $$$P$$$ integers, $$$S_1$$$ to $$$S_P$$$, denoting the number of stuffed animals in each pile.

Output

Line $$$1$$$: An integer representing the minimum number of operations Silly Nilly must complete.

Example
Input
5 3
9 4 6 2 5
Output
2
Note

$$$1 \lt = P \lt = 10^5$$$

$$$1 \lt = L \lt = P$$$

$$$1 \lt = S_i \lt = 10^9$$$