#D8640. ABSum

    ID: 7183 Type: Default 1000ms 268MiB

ABSum

ABSum

problem

Given a sequence A A of length N N . You can swap the i i th and j j th (0 leqi,j leqN1 0 \ leq i, j \ leq N-1 ) elements of a sequence up to M M times.

Find the maximum value of  sumi=0N1abs(Aii) \ sum_ {i = 0} ^ {N -1} abs (A_i --i) in the sequence created by the operation.

output

Find the maximum value of  sumi=0N1abs(Aii) \ sum_ {i = 0} ^ {N --1} abs (A_i --i) in the sequence created by the operation. Also, output a line feed at the end.

Example

Input

5 2 0 3 2 1 4

Output

12

inputFormat

outputFormat

output

Find the maximum value of  sumi=0N1abs(Aii) \ sum_ {i = 0} ^ {N --1} abs (A_i --i) in the sequence created by the operation. Also, output a line feed at the end.

Example

Input

5 2 0 3 2 1 4

Output

12

样例

5 2
0 3 2 1 4
12