N=int(eval(input()))

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



cnt=0

S=0

mi=10000000000

C0=False



for i in range(N):

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

    if A[i]>0:

        S+=A[i]

    elif A[i]==0:

        C0==True

    elif A[i]<0:

        cnt+=1

        S+=(-A[i])



if cnt%2==0 or C0==True:

    print(S)

else:

    print((S-mi*2))

N=int(eval(input()))

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



mi=10**9+1

S=0

cnt=0

for i in range(N):

    if A[i]<0:

        cnt+=1

    a=abs(A[i])

    S+=a

    mi=min(mi,a)



if cnt%2==0:

    ans=S

else:

    ans=S-2*mi

print(ans)
N = int(eval(input()))
A = list(map(int, input().split()))
cnt = 0
S = 0
mi = 10000000000
C0 = False
for i in range(N):
    mi = min(mi, abs(A[i]))
    if A[i] > 0:
        S += A[i]
    elif A[i] == 0:
        C0 == True
    elif A[i] < 0:
        cnt += 1
        S += -A[i]
if cnt % 2 == 0 or C0 == True:
    print(S)
else:
    print((S - mi * 2))

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

+mi = 10**9 + 1 +S = 0 -S = 0 -mi = 10000000000 -C0 = False -    mi = min(mi, abs(A[i])) -    if A[i] > 0: -        S += A[i] -    elif A[i] == 0: -        C0 == True -    elif A[i] < 0: +    if A[i] < 0: -        S += -A[i] -if cnt % 2 == 0 or C0 == True: -    print(S) +    a = abs(A[i]) +    S += a +    mi = min(mi, a) +if cnt % 2 == 0: +    ans = S -    print((S - mi * 2)) +    ans = S - 2 * mi +print(ans)