N = int(eval(input()))

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

A.sort()



for i in range(N//2):

    if A[i*2] + A[i*2+1] < 0:

        A[i*2] = -1 * A[i*2]

        A[i*2+1] = -1 * A[i*2+1]

    else:

        break



print((sum(A)))
N = int(eval(input()))

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



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

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

ans = sum(abs_A)



if num_of_minus % 2 == 0:

    print(ans)

else:

    print((ans - 2 * min(abs_A)))
N = int(eval(input()))
A = list(map(int, input().split()))
A.sort()
for i in range(N // 2):
    if A[i * 2] + A[i * 2 + 1] < 0:
        A[i * 2] = -1 * A[i * 2]
        A[i * 2 + 1] = -1 * A[i * 2 + 1]
    else:
        break
print((sum(A)))

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

-A.sort() -for i in range(N // 2): -    if A[i * 2] + A[i * 2 + 1] < 0: -        A[i * 2] = -1 * A[i * 2] -        A[i * 2 + 1] = -1 * A[i * 2 + 1] -    else: -        break -print((sum(A))) +num_of_minus = sum([a < 0 for a in A]) +abs_A = [abs(a) for a in A] +ans = sum(abs_A) +if num_of_minus % 2 == 0: +    print(ans) +else: +    print((ans - 2 * min(abs_A)))