N = int(eval(input()))

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



cnt = 0

for i in range(N):

    if A[i] < 0:

        cnt += 1

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

if cnt % 2 == 0:

    print((sum(A)))

else:

    A.sort()

    print((sum(A) - A[0] * 2))
N = int(eval(input()))

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

minus_cnt = 0

for i in range(len(A)):

    if A[i] < 0:

        minus_cnt += 1

        A[i] = -A[i]

if minus_cnt % 2 == 0:

    print((sum(A)))

else:

    tmp = float("inf")

    for a in A:

        if tmp > abs(a):

            tmp = a

    print((sum(A) - 2 * tmp))

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

N = int(eval(input()))
A = list(map(int, input().split()))
minus_cnt = 0
for i in range(len(A)):
    if A[i] < 0:
        minus_cnt += 1
        A[i] = -A[i]
if minus_cnt % 2 == 0:
    print((sum(A)))
else:
    tmp = float("inf")
    for a in A:
        if tmp > abs(a):
            tmp = a
    print((sum(A) - 2 * tmp))

-cnt = 0 -for i in range(N): +minus_cnt = 0 +for i in range(len(A)): -        cnt += 1 -        A[i] = -1 * A[i] -if cnt % 2 == 0: +        minus_cnt += 1 +        A[i] = -A[i] +if minus_cnt % 2 == 0: -    A.sort() -    print((sum(A) - A[0] * 2)) +    tmp = float("inf") +    for a in A: +        if tmp > abs(a): +            tmp = a +    print((sum(A) - 2 * tmp))