# ABC125 D - Flipping Signs

N = int(eval(input()))

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



cnt = 0

is_zero = False

for i in range(N):

    if A[i] < 0:

        cnt += 1

    if A[i] == 0:

        is_zero = True



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



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

    print((sum(A)))

else:

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

    

n=int(eval(input()))

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

c=0

is_zero=False



for aa in a:

    if aa<0:c+=1

    if aa==0:is_zero=True



a=[abs(aa) for aa in a]

if c%2==0 or is_zero==True:

    print((sum(a)))

else:

    print((sum(a)-2*min(a)))

# ABC125 D - Flipping Signs
N = int(eval(input()))
A = list(map(int, input().split()))
cnt = 0
is_zero = False
for i in range(N):
    if A[i] < 0:
        cnt += 1
    if A[i] == 0:
        is_zero = True
A = [abs(a) for a in A]
if cnt % 2 == 0 or is_zero == True:
    print((sum(A)))
else:
    print((sum(A) - 2 * min(A)))

n = int(eval(input()))
a = list(map(int, input().split()))
c = 0
is_zero = False
for aa in a:
    if aa < 0:
        c += 1
    if aa == 0:
        is_zero = True
a = [abs(aa) for aa in a]
if c % 2 == 0 or is_zero == True:
    print((sum(a)))
else:
    print((sum(a) - 2 * min(a)))

-# ABC125 D - Flipping Signs -N = int(eval(input())) -A = list(map(int, input().split())) -cnt = 0 +n = int(eval(input())) +a = list(map(int, input().split())) +c = 0 -for i in range(N): -    if A[i] < 0: -        cnt += 1 -    if A[i] == 0: +for aa in a: +    if aa < 0: +        c += 1 +    if aa == 0: -A = [abs(a) for a in A] -if cnt % 2 == 0 or is_zero == True: -    print((sum(A))) +a = [abs(aa) for aa in a] +if c % 2 == 0 or is_zero == True: +    print((sum(a))) -    print((sum(A) - 2 * min(A))) +    print((sum(a) - 2 * min(a)))