N = int(eval(input()))

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



negA = []

posA = []

for a in A:

    if a >= 0:

        posA.append(a)

    else:

        negA.append(a)



ans = sum(posA) - sum(negA)



if len(negA) % 2 == 1:

    ans -= min([abs(a) for a in A]) * 2



print(ans)

N = int(eval(input()))

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

B = [abs(a) for a in A]



minus = sum([a < 0 for a in A])

ans = sum(B)



if minus % 2 == 1:

    ans -= min(B) * 2



print(ans)

N = int(eval(input()))
A = list(map(int, input().split()))
negA = []
posA = []
for a in A:
    if a >= 0:
        posA.append(a)
    else:
        negA.append(a)
ans = sum(posA) - sum(negA)
if len(negA) % 2 == 1:
    ans -= min([abs(a) for a in A]) * 2
print(ans)

N = int(eval(input()))
A = list(map(int, input().split()))
B = [abs(a) for a in A]
minus = sum([a < 0 for a in A])
ans = sum(B)
if minus % 2 == 1:
    ans -= min(B) * 2
print(ans)

-negA = [] -posA = [] -for a in A: -    if a >= 0: -        posA.append(a) -    else: -        negA.append(a) -ans = sum(posA) - sum(negA) -if len(negA) % 2 == 1: -    ans -= min([abs(a) for a in A]) * 2 +B = [abs(a) for a in A] +minus = sum([a < 0 for a in A]) +ans = sum(B) +if minus % 2 == 1: +    ans -= min(B) * 2