n = int(eval(input()))

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

box = []

count = 0

zero = 0

for num in range(n):

    box.append(abs(a[num]))

for num in a:

    if num < 0:

        count += 1

    elif num == 0:

        zero += 1

box.sort()



if count % 2 == 0 or zero > 0:

    print((sum(box)))

else:

    box[0] = -box[0]

    print((sum(box)))
n = int(eval(input()))

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

pbox = []

nbox = []

if 0 in a:

    count = 0

    for i in a:

        count += abs(i)

    print(count)

else:

    for i in a:

        if i > 0:

            pbox.append(i)

        else:

            nbox.append(i)

    if len(nbox) % 2 == 0:

        count = 0

        for i in a:

            count += abs(i)

        print(count)

    else:

        box = []

        for i in a:

            box.append(abs(i))

        mi = min(box)

        count = 0

        for i in a:

            count += abs(i)

        print((count - 2*mi))
n = int(eval(input()))
a = list(map(int, input().split()))
box = []
count = 0
zero = 0
for num in range(n):
    box.append(abs(a[num]))
for num in a:
    if num < 0:
        count += 1
    elif num == 0:
        zero += 1
box.sort()
if count % 2 == 0 or zero > 0:
    print((sum(box)))
else:
    box[0] = -box[0]
    print((sum(box)))

n = int(eval(input()))
a = list(map(int, input().split()))
pbox = []
nbox = []
if 0 in a:
    count = 0
    for i in a:
        count += abs(i)
    print(count)
else:
    for i in a:
        if i > 0:
            pbox.append(i)
        else:
            nbox.append(i)
    if len(nbox) % 2 == 0:
        count = 0
        for i in a:
            count += abs(i)
        print(count)
    else:
        box = []
        for i in a:
            box.append(abs(i))
        mi = min(box)
        count = 0
        for i in a:
            count += abs(i)
        print((count - 2 * mi))

-box = [] -count = 0 -zero = 0 -for num in range(n): -    box.append(abs(a[num])) -for num in a: -    if num < 0: -        count += 1 -    elif num == 0: -        zero += 1 -box.sort() -if count % 2 == 0 or zero > 0: -    print((sum(box))) +pbox = [] +nbox = [] +if 0 in a: +    count = 0 +    for i in a: +        count += abs(i) +    print(count) -    box[0] = -box[0] -    print((sum(box))) +    for i in a: +        if i > 0: +            pbox.append(i) +        else: +            nbox.append(i) +    if len(nbox) % 2 == 0: +        count = 0 +        for i in a: +            count += abs(i) +        print(count) +    else: +        box = [] +        for i in a: +            box.append(abs(i)) +        mi = min(box) +        count = 0 +        for i in a: +            count += abs(i) +        print((count - 2 * mi))