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.
from calendar import c
import itertools
import heapq
import collections
import math
from operator import inv
from random import randrange
from re import A, M, T
import re
import sys
from tkinter import N
from typing import Counter

input = sys.stdin.readline


############ ---- Input Functions ---- ############
def inp():
    return (int(input()))


def inlt():
    return (list(map(int, input().split())))


def insr():
    s = input()
    return (list(s[:len(s) - 1]))


def invr():
    return (map(int, input().split()))


def inis():
    return (input().split())


def stlt():
    return list(map(str, input().split()))


###################################################

# # Code to find top 3 elements and their counts
# # using most_common
#
# arr = [1, 3, 4, 1, 2, 1, 1, 3, 4, 3, 5, 1, 2, 5, 3, 4, 5]
# counter = Counter(arr)
# top_three = counter.most_common()
# print(sorted(top_three))
#
#
# # Python code to find 3 largest and 4 smallest
# # elements of a list.
#
# grades = [110, 25, 38, 49, 20, 95, 33, 87, 80, 90, 110]
# print(heapq.nlargest(3, grades))
# print(heapq.nsmallest(4, grades))


def SieveOfEratosthenes(n):
    prime = [True for i in range(n + 1)]
    p = 2
    l = []
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n + 1, p):
                prime[i] = False
        p += 1
    for p in range(2, n + 1):
        if prime[p]:
            l.append(p)
    return l


def isPrime(n):
    prime_flag = 0

    if n > 1:
        for i in range(2, int(math.sqrt(n)) + 1):
            if n % i == 0:
                prime_flag = 1
                break
        if prime_flag == 0:
            return True
        else:
            return False
    else:
        return False


def gcd(a):
    x = 0
    for p in a:
        x = math.gcd(x, p)
    return x


# method to print the divisors
def printDivisors(n):
    # Note that this loop runs till square root
    i = 1
    ans = []
    while i <= math.sqrt(n):

        if (n % i == 0):

            # If divisors are equal, print only one
            if (n / i == i):
                ans.append(i)
            else:
                # Otherwise print both
                ans.append(i)
                ans.append(n // i)
        i = i + 1
    ans.sort()
    return ans


def binaryToDecimal(n):
    return int(n, 2)


def countTriplets(a, n):
    s = set()
    for i in range(n):
        s.add(a[i])
    count = 0
    for i in range(n):
        for j in range(i + 1, n, 1):
            xr = a[i] ^ a[j]
            if xr in s and xr != a[i] and xr != a[j]:
                count += 1
    return int(count // 3)


def generate_twins(n):
    a = 0
    for i in range(1, n + 1):
        j = i + 2
        if isPrime(i) and isPrime(j):
            if 2 ^ (i ^ j) == 0:
                a += 1
    return a


def smallestDivisor(n):
    if (n % 2 == 0):
        return 2
    i = 3
    while (i * i <= n):
        if (n % i == 0):
            return i
        i += 2
    return n


def countOdd(L, R):
    N = (R - L) // 2

    # if either R or L is odd
    if (R % 2 != 0 or L % 2 != 0):
        N += 1

    return N


def isPalindrome(s):
    return s == s[::-1]


def power(x, y, p):
    res = 1 
    x = x % p
    while (y > 0):
        if (y & 1):
            res = (res * x) % p
        y = y >> 1 
        x = (x * x) % p
         
    return res

def RightAngled(a, n):
	
	# To store the number of points
	# has same x or y coordinates
	xpoints = collections.defaultdict(lambda:0)
	ypoints = collections.defaultdict(lambda:0)
	
	for i in range(n):
		xpoints[a[i][0]] += 1
		ypoints[a[i][1]] += 1
		
	# Store the total count of triangle
	count = 0
	
	# Iterate to check for total number
	# of possible triangle
	for i in range(n):
		if (xpoints[a[i][0]] >= 1 and
			ypoints[a[i][1]] >= 1):
			
			# Add the count of triangles
			# formed
			count += ((xpoints[a[i][0]] - 1) *
					(ypoints[a[i][1]] - 1))
			
	# Total possible triangle
	return count

# def factorial( n) :
#     res = [None]*500
#     # Initialize result
#     res[0] = 1
#     res_size = 1
 
#     # Apply simple factorial formula
#     # n! = 1 * 2 * 3 * 4...*n
#     x = 2
#     while x <= n :
#         res_size = multiply(x, res, res_size)
#         x = x + 1
     
    
#     i = res_size-1
#     while i >= 0 :
#         sys.stdout.write(str(res[i]))
#         sys.stdout.flush()
#         i = i - 1
         
 

# def multiply(x, res,res_size) :
     
#     carry = 0 # Initialize carry
 
#     # One by one multiply n with individual
#     # digits of res[]
#     i = 0
#     while i < res_size :
#         prod = res[i] *x + carry
#         res[i] = prod % 10; # Store last digit of
#                             # 'prod' in res[]
#         # make sure floor division is used
#         carry = prod//10; # Put rest in carry
#         i = i + 1
 
#     # Put carry in res and increase result size
#     while (carry) :
#         res[res_size] = carry % 10
#         # make sure floor division is used
#         # to avoid floating value
#         carry = carry // 10
#         res_size = res_size + 1
         
#     return res_size

def calculate_factorial_multi_half(number):

    if number == 1 or number == 0:
        return 1

    handle_odd = False
    upto_number = number

    if number & 1 == 1:
        upto_number -= 1
        # print(upto_number)
        handle_odd = True

    next_sum = upto_number
    next_multi = upto_number
    factorial = 1

    while next_sum >= 2:
        factorial *= next_multi
        next_sum -= 2
        next_multi += next_sum

    if handle_odd:
        factorial *= number

    return factorial
########################################################################
#################----------Code Here------------########################
########################################################################

n, k = invr()
a = inlt()
a.sort()
i = 0
for i in range(k):
    a[i] = a[i] * (-1)
    i += 1
print(sum(a))
