We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poor.

There are *n* citizens in Kekoland, each person has *c*<sub class="lower-index">*i*</sub> coins. Each day, Robin Hood will take exactly 1 coin from the richest person in the city and he will give it to the poorest person (poorest person right after taking richest's 1 coin). In case the choice is not unique, he will select one among them at random. Sadly, Robin Hood is old and want to retire in *k* days. He decided to spend these last days with helping poor people. 

After taking his money are taken by Robin Hood richest person may become poorest person as well, and it might even happen that Robin Hood will give his money back. For example if all people have same number of coins, then next day they will have same number of coins too. 

Your task is to find the difference between richest and poorest persons wealth after *k* days. Note that the choosing at random among richest and poorest doesn't affect the answer.
The first line of the input contains two integers *n* and *k* (1 ≤ *n* ≤ 500 000, 0 ≤ *k* ≤ 10<sup class="upper-index">9</sup>) — the number of citizens in Kekoland and the number of days left till Robin Hood's retirement.

The second line contains *n* integers, the *i*-th of them is *c*<sub class="lower-index">*i*</sub> (1 ≤ *c*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — initial wealth of the *i*-th person.
Lets look at how wealth changes through day in the first sample.
 1.  [1, 1, 4, 2] 1.  [2, 1, 3, 2] or [1, 2, 3, 2] 
So the answer is 3 - 1 = 2

In second sample wealth will remain the same for each person.
4 1
1 1 4 2
2
3 1
2 2 2
0
10 20
6 4 7 10 4 5 5 3 7 10
1
30 7
3 3 2 2 2 2 3 4 4 5 2 1 1 5 5 3 4 3 2 1 3 4 3 2 2 5 2 5 1 2
2
2 0
182 2
180
123 54564
38 44 41 42 59 3 95 15 45 32 44 69 35 83 94 57 65 85 64 47 24 20 34 86 26 91 98 12 36 96 80 4 70 40 95 38 70 22 58 50 34 84 80 45 14 60 61 43 11 56 19 59 50 63 21 15 97 98 27 13 9 71 32 18 90 10 2 99 75 87 74 83 79 37 89 3 49 27 92 95 49 1 26 50 72 75 81 37 60 98 28 28 10 93 99 63 14 26 69 51 47 59 42 7 20 17 75 44 44 20 44 85 27 32 65 95 47 46 12 22 64 77 21
1
111 10
2 8 6 1 3 5 8 3 8 2 9 9 6 9 8 8 5 2 3 8 8 3 8 3 7 9 4 3 9 7 1 8 3 1 5 5 5 8 2 4 2 7 9 1 4 4 3 1 6 7 7 4 1 3 5 3 9 4 4 4 8 8 7 3 5 6 3 3 8 2 8 4 5 8 1 8 4 1 7 1 4 9 8 9 7 6 5 6 3 7 4 8 9 3 8 9 9 3 5 9 1 3 6 8 9 1 1 3 8 7 6
8
10 1000000
307196 650096 355966 710719 99165 959865 500346 677478 614586 6538
80333
5 1000000
145119584 42061308 953418415 717474449 57984109
909357107
100 20
2 5 3 3 2 7 6 2 2 2 6 7 2 1 8 10 2 4 10 6 10 2 1 1 4 7 1 2 9 7 5 3 7 4 6 3 10 10 3 7 6 8 2 2 10 3 1 2 1 3 1 6 3 1 4 10 3 10 9 5 10 4 3 10 3 3 5 3 10 2 1 5 10 7 8 7 7 2 4 2 1 3 3 8 8 5 7 3 1 1 8 10 5 7 4 4 7 7 1 9
7
10 1000
1000000000 999999994 999999992 1000000000 999999994 999999999 999999990 999999997 999999995 1000000000
1
2 100000
1 3
0
4 0
1 4 4 4
3
4 42
1 1 1 1000000000
999999943
3 4
1 2 7
1
4 100
1 1 10 10
1
n, k = map(int, input().split())
c = list(map(int, input().split()))

richest = max(c)
poorest = min(c)
for i in range(k):
    richest_idx = c.index(richest)
    poorest_idx = c.index(poorest)
    c[richest_idx] -= 1
    c[poorest_idx] += 1
    richest = max(c)
    poorest = min(c)

print(richest - poorest)
