N = int(eval(input()))

A = [int(i) for i in input().split()]



cnt = 0

s = 0

minabs = 10**11

for a in A:

    if a <= -1:

        cnt += 1

    s += abs(a)

    minabs = min(minabs, abs(a))



if cnt % 2 == 0:

    print(s)

else:

    print((s-minabs*2))

N = int(eval(input()))

A = [int(i) for i in input().split()]



m = 10**20

c = 0

for a in A:

    if a < 0:

        c += 1

    m = min(m, abs(a))



if c % 2 == 0:

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

else:

    ans = sum([abs(a) for a in A]) - m*2



print(ans)

N = int(eval(input()))
A = [int(i) for i in input().split()]
cnt = 0
s = 0
minabs = 10**11
for a in A:
    if a <= -1:
        cnt += 1
    s += abs(a)
    minabs = min(minabs, abs(a))
if cnt % 2 == 0:
    print(s)
else:
    print((s - minabs * 2))

N = int(eval(input()))
A = [int(i) for i in input().split()]
m = 10**20
c = 0
for a in A:
    if a < 0:
        c += 1
    m = min(m, abs(a))
if c % 2 == 0:
    ans = sum([abs(a) for a in A])
else:
    ans = sum([abs(a) for a in A]) - m * 2
print(ans)

-cnt = 0 -s = 0 -minabs = 10**11 +m = 10**20 +c = 0 -    if a <= -1: -        cnt += 1 -    s += abs(a) -    minabs = min(minabs, abs(a)) -if cnt % 2 == 0: -    print(s) +    if a < 0: +        c += 1 +    m = min(m, abs(a)) +if c % 2 == 0: +    ans = sum([abs(a) for a in A]) -    print((s - minabs * 2)) +    ans = sum([abs(a) for a in A]) - m * 2 +print(ans)