from itertools import *



N = int(eval(input()))

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



total = 0

minim = 1000000000

num_negs = 0



for a in An:

    if a < 0:

        num_negs += 1

        a *= -1

        pass

    total += a

    minim = min(minim, a)

    pass



if num_negs % 2:

    print((total - 2*minim))

else:

    print(total)

    pass



N = int(eval(input()))

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



total = 0

minim = 1000000000

num_negs = 0



for a in An:

    if a < 0:

        num_negs += 1

        a *= -1

        pass

    total += a

    minim = minim if minim < a else a

    pass



if num_negs % 2:

    print((total - 2*minim))

else:

    print(total)

    pass

from itertools import *

N = int(eval(input()))
An = list(map(int, input().split()))
total = 0
minim = 1000000000
num_negs = 0
for a in An:
    if a < 0:
        num_negs += 1
        a *= -1
        pass
    total += a
    minim = min(minim, a)
    pass
if num_negs % 2:
    print((total - 2 * minim))
else:
    print(total)
    pass

N = int(eval(input()))
An = list(map(int, input().split()))
total = 0
minim = 1000000000
num_negs = 0
for a in An:
    if a < 0:
        num_negs += 1
        a *= -1
        pass
    total += a
    minim = minim if minim < a else a
    pass
if num_negs % 2:
    print((total - 2 * minim))
else:
    print(total)
    pass

-from itertools import * - -    minim = min(minim, a) +    minim = minim if minim < a else a