n = int(eval(input()))

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



cnt = sum(i < 0 for i in a)

ans = sum(abs(i) for i in a)

if cnt % 2 == 0:

    print(ans)

elif cnt % 2 == 1:

    print((ans - 2 * min(abs(i) for i in a)))

n = int(eval(input()))

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



cnt, ans, num = 0, 0, 10 ** 10

for ai in a:

    cnt += (ai < 0)

    ans += abs(ai)

    num = min(num, abs(ai))

print((ans if cnt % 2 == 0 else ans - 2 * num))

n = int(eval(input()))
a = list(map(int, input().split()))
cnt = sum(i < 0 for i in a)
ans = sum(abs(i) for i in a)
if cnt % 2 == 0:
    print(ans)
elif cnt % 2 == 1:
    print((ans - 2 * min(abs(i) for i in a)))

n = int(eval(input()))
a = list(map(int, input().split()))
cnt, ans, num = 0, 0, 10**10
for ai in a:
    cnt += ai < 0
    ans += abs(ai)
    num = min(num, abs(ai))
print((ans if cnt % 2 == 0 else ans - 2 * num))

-cnt = sum(i < 0 for i in a) -ans = sum(abs(i) for i in a) -if cnt % 2 == 0: -    print(ans) -elif cnt % 2 == 1: -    print((ans - 2 * min(abs(i) for i in a))) +cnt, ans, num = 0, 0, 10**10 +for ai in a: +    cnt += ai < 0 +    ans += abs(ai) +    num = min(num, abs(ai)) +print((ans if cnt % 2 == 0 else ans - 2 * num))