N = int(eval(input()))

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



absA = []

for i in range(N):

    absA.append(abs(A[i]))



cnt = 0

for i in range(N):

    if A[i] < 0:

        cnt += 1



flag = 0

for i in range(N):

    if A[i] != 0:

        flag = 1

    if flag == 1 and A[i] == 0:

        cnt += 1

    

if cnt % 2 == 0:

    ans = sum(absA)

else:

    ans = sum(absA) - min(absA) * 2



print(ans)
N = int(eval(input()))

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

 

absA = []

for i in range(N):

    absA.append(abs(A[i]))



cnt = 0

for i in range(N):

    if A[i] <= 0:

        cnt += 1

    

if cnt % 2 == 0:

    ans = sum(absA)

else:

    ans = sum(absA) - min(absA) * 2



print(ans)
N = int(eval(input()))
A = [int(i) for i in input().split()]
absA = []
for i in range(N):
    absA.append(abs(A[i]))
cnt = 0
for i in range(N):
    if A[i] < 0:
        cnt += 1
flag = 0
for i in range(N):
    if A[i] != 0:
        flag = 1
    if flag == 1 and A[i] == 0:
        cnt += 1
if cnt % 2 == 0:
    ans = sum(absA)
else:
    ans = sum(absA) - min(absA) * 2
print(ans)

N = int(eval(input()))
A = [int(i) for i in input().split()]
absA = []
for i in range(N):
    absA.append(abs(A[i]))
cnt = 0
for i in range(N):
    if A[i] <= 0:
        cnt += 1
if cnt % 2 == 0:
    ans = sum(absA)
else:
    ans = sum(absA) - min(absA) * 2
print(ans)

-    if A[i] < 0: -        cnt += 1 -flag = 0 -for i in range(N): -    if A[i] != 0: -        flag = 1 -    if flag == 1 and A[i] == 0: +    if A[i] <= 0: