def d_flipping_signs(N, A):

    minus_count = 0

    _a = []

    for a in A:

        if a >= 0:

            _a.append(a)

        else:

            minus_count += 1

            _a.append(abs(a))

    ans = sum(_a)

    if minus_count % 2 == 1:

        ans -= 2 * min(_a)

    return ans



N = int(eval(input()))

A = [int(i) for i in input().split()]

print((d_flipping_signs(N, A)))
def d_flipping_signs(N, A):

    minus_count_parity = len([1 for a in A if a < 0]) % 2

    a = list(map(abs, A))

    return sum(a) + (-2 * min(a) if minus_count_parity == 1 else 0)



N = int(eval(input()))

A = [int(i) for i in input().split()]

print((d_flipping_signs(N, A)))
def d_flipping_signs(N, A):
    minus_count = 0
    _a = []
    for a in A:
        if a >= 0:
            _a.append(a)
        else:
            minus_count += 1
            _a.append(abs(a))
    ans = sum(_a)
    if minus_count % 2 == 1:
        ans -= 2 * min(_a)
    return ans


N = int(eval(input()))
A = [int(i) for i in input().split()]
print((d_flipping_signs(N, A)))

def d_flipping_signs(N, A):
    minus_count_parity = len([1 for a in A if a < 0]) % 2
    a = list(map(abs, A))
    return sum(a) + (-2 * min(a) if minus_count_parity == 1 else 0)


N = int(eval(input()))
A = [int(i) for i in input().split()]
print((d_flipping_signs(N, A)))

-    minus_count = 0 -    _a = [] -    for a in A: -        if a >= 0: -            _a.append(a) -        else: -            minus_count += 1 -            _a.append(abs(a)) -    ans = sum(_a) -    if minus_count % 2 == 1: -        ans -= 2 * min(_a) -    return ans +    minus_count_parity = len([1 for a in A if a < 0]) % 2 +    a = list(map(abs, A)) +    return sum(a) + (-2 * min(a) if minus_count_parity == 1 else 0)