Roma works in a company that sells TVs. Now he has to prepare a report for the last year.

Roma has got a list of the company's incomes. The list is a sequence that consists of *n* integers. The total income of the company is the sum of all integers in sequence. Roma decided to perform exactly *k* changes of signs of several numbers in the sequence. He can also change the sign of a number one, two or more times.

The operation of changing a number's sign is the operation of multiplying this number by -1.

Help Roma perform the changes so as to make the total income of the company (the sum of numbers in the resulting sequence) maximum. Note that Roma should perform exactly *k* changes.
The first line contains two integers *n* and *k* (1 ≤ *n*, *k* ≤ 10<sup class="upper-index">5</sup>), showing, how many numbers are in the sequence and how many swaps are to be made.

The second line contains a non-decreasing sequence, consisting of *n* integers *a*<sub class="lower-index">*i*</sub> (|*a*<sub class="lower-index">*i*</sub>| ≤ 10<sup class="upper-index">4</sup>).

The numbers in the lines are separated by single spaces. Please note that the given sequence is sorted in non-decreasing order.
def smallest_positive(x):
    ret = -100
    for i in range(len(x)):
        if x[i] > 0 and ret < 0:
            ret = x[i]
    return ret
    
def biggest_negative(x):
    ret = 100
    for i in range(len(x)-1, -1, -1):
        if x[i] < 0 and ret > 0:
            ret = x[i]
    return ret


n,k = map(int, input().split())
zero = False
sp = -2
bn = -2
t1 = False
t2 = False
a = list(map(int, input().split()))
b = []
for i in range(n):
    b.append(a[i])
    

for i in range(n):
    if a[i] == 0:
        zero = True
    if a[i] >= 0 and not t1:
        bn = i-1
        t1 = True
    if a[i] > 0 and not t2:
        sp = i-1
        t2 = True
        
if bn != -2:
    for i in range(0 if bn == -1 else bn+1):
        a[i] = -1 * a[i]
        k -= 1
        if k == 0:
            print(sum(a))
            exit()
if zero or k % 2 == 0:
    print(sum(a))
    exit()
    
spx = smallest_positive(b)
bnx = biggest_negative(b)

if spx == -100:
    print(sum(a) + bnx * 2)
elif bnx == 100:
    print(sum(a) - spx * 2)
elif abs(spx) < abs(bnx):
    print(sum(a) - spx * 2)
else:
    print(sum(a) + bnx * 2)
    