N = int(eval(input()))

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

cnt = 0

amin = 10**9+7

tot = 0

for i in range(N):

    if A[i]<0:

        cnt += 1

    amin = min(amin,abs(A[i]))

    tot += abs(A[i])

if cnt%2==0:

    print(tot)

else:

    print((tot-2*amin))
N = int(eval(input()))

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

m = 0

z = 0

for i in range(N):

    if A[i]<0:

        m += 1

    elif A[i]==0:

        z += 1

m = m%2

B = sorted([abs(A[i]) for i in range(N)])

p = m-z

if p>0:

    for i in range(z,z+p):

        B[i] = -B[i]

    print((sum(B)))

else:

    print((sum(B)))
N = int(eval(input()))
A = list(map(int, input().split()))
cnt = 0
amin = 10**9 + 7
tot = 0
for i in range(N):
    if A[i] < 0:
        cnt += 1
    amin = min(amin, abs(A[i]))
    tot += abs(A[i])
if cnt % 2 == 0:
    print(tot)
else:
    print((tot - 2 * amin))

N = int(eval(input()))
A = list(map(int, input().split()))
m = 0
z = 0
for i in range(N):
    if A[i] < 0:
        m += 1
    elif A[i] == 0:
        z += 1
m = m % 2
B = sorted([abs(A[i]) for i in range(N)])
p = m - z
if p > 0:
    for i in range(z, z + p):
        B[i] = -B[i]
    print((sum(B)))
else:
    print((sum(B)))

-cnt = 0 -amin = 10**9 + 7 -tot = 0 +m = 0 +z = 0 -        cnt += 1 -    amin = min(amin, abs(A[i])) -    tot += abs(A[i]) -if cnt % 2 == 0: -    print(tot) +        m += 1 +    elif A[i] == 0: +        z += 1 +m = m % 2 +B = sorted([abs(A[i]) for i in range(N)]) +p = m - z +if p > 0: +    for i in range(z, z + p): +        B[i] = -B[i] +    print((sum(B))) -    print((tot - 2 * amin)) +    print((sum(B)))