N = int(eval(input()))

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



cnt = len([1 for i in range(N) if A[i] < 0])

SUM = sum(map(abs,A))

MIN = min(list(map(abs,A)))



if cnt%2 == 0:

    print(SUM)

else:

    print((SUM-2*MIN))
N=int(eval(input()))

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

print((sum(map(abs,A))-2*min(list(map(abs,A)))*(sum([1 for i in A if i<0])%2)))
N = int(eval(input()))
A = list(map(int, input().split()))
cnt = len([1 for i in range(N) if A[i] < 0])
SUM = sum(map(abs, A))
MIN = min(list(map(abs, A)))
if cnt % 2 == 0:
    print(SUM)
else:
    print((SUM - 2 * MIN))

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

-cnt = len([1 for i in range(N) if A[i] < 0]) -SUM = sum(map(abs, A)) -MIN = min(list(map(abs, A))) -if cnt % 2 == 0: -    print(SUM) -else: -    print((SUM - 2 * MIN)) +print( +    (sum(map(abs, A)) - 2 * min(list(map(abs, A))) * (sum([1 for i in A if i < 0]) % 2)) +)