N = int(eval(input()))

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

count = 0

gokei = 0

mi = float('inf')

flg = False

for i in arr:

    gokei += abs(i)

    mi = min(mi,abs(i))

    if i < 0:

        count += 1

    if i == 0:

        flg = True

if flg or count % 2 == 0:

    print(gokei)

else:

    print((gokei-mi*2))
N = int(eval(input()))

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

cnt = 0

flg = False

for i in range(N):

    if arr[i] == 0:

        flg = True

    if arr[i] < 0:

        cnt += 1

    arr[i] = abs(arr[i])

if cnt % 2 == 0 or flg:

    print((sum(arr)))

else:

    print((sum(arr) - min(arr)*2))
N = int(eval(input()))
arr = list(map(int, input().split()))
count = 0
gokei = 0
mi = float("inf")
flg = False
for i in arr:
    gokei += abs(i)
    mi = min(mi, abs(i))
    if i < 0:
        count += 1
    if i == 0:
        flg = True
if flg or count % 2 == 0:
    print(gokei)
else:
    print((gokei - mi * 2))

N = int(eval(input()))
arr = list(map(int, input().split()))
cnt = 0
flg = False
for i in range(N):
    if arr[i] == 0:
        flg = True
    if arr[i] < 0:
        cnt += 1
    arr[i] = abs(arr[i])
if cnt % 2 == 0 or flg:
    print((sum(arr)))
else:
    print((sum(arr) - min(arr) * 2))

-count = 0 -gokei = 0 -mi = float("inf") +cnt = 0 -for i in arr: -    gokei += abs(i) -    mi = min(mi, abs(i)) -    if i < 0: -        count += 1 -    if i == 0: +for i in range(N): +    if arr[i] == 0: -if flg or count % 2 == 0: -    print(gokei) +    if arr[i] < 0: +        cnt += 1 +    arr[i] = abs(arr[i]) +if cnt % 2 == 0 or flg: +    print((sum(arr))) -    print((gokei - mi * 2)) +    print((sum(arr) - min(arr) * 2))