n = int(eval(input()))

a = list(map(int, input().split()))

b = 0

ans = 0



for i in range(n):

    if a[i] < 0:

        b += 1

        a[i] = abs(a[i])

        

if (0 in a) or ((b % 2) == 0):

    pass

else:

    ans -= min(a) * 2



ans += sum(a)

print(ans)
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



n, *a = list(map(int, read().split()))

cnt = 0

for i, aa in enumerate(a):

    if aa < 0:

        a[i] = -aa

        cnt += 1

if cnt % 2 == 0:

    print((sum(a)))

else:

    print((sum(a) - min(a) * 2))

n = int(eval(input()))
a = list(map(int, input().split()))
b = 0
ans = 0
for i in range(n):
    if a[i] < 0:
        b += 1
        a[i] = abs(a[i])
if (0 in a) or ((b % 2) == 0):
    pass
else:
    ans -= min(a) * 2
ans += sum(a)
print(ans)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, *a = list(map(int, read().split()))
cnt = 0
for i, aa in enumerate(a):
    if aa < 0:
        a[i] = -aa
        cnt += 1
if cnt % 2 == 0:
    print((sum(a)))
else:
    print((sum(a) - min(a) * 2))

-n = int(eval(input())) -a = list(map(int, input().split())) -b = 0 -ans = 0 -for i in range(n): -    if a[i] < 0: -        b += 1 -        a[i] = abs(a[i]) -if (0 in a) or ((b % 2) == 0): -    pass +import sys + +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines +sys.setrecursionlimit(10**7) +n, *a = list(map(int, read().split())) +cnt = 0 +for i, aa in enumerate(a): +    if aa < 0: +        a[i] = -aa +        cnt += 1 +if cnt % 2 == 0: +    print((sum(a))) -    ans -= min(a) * 2 -ans += sum(a) -print(ans) +    print((sum(a) - min(a) * 2))