n = int(eval(input()))

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

sum_abs, min_abs, cnt_minus = 0, 10**9, 0

for ai in a:

    if ai < 0:

        cnt_minus += 1

    abs_ai = abs(ai)

    sum_abs += abs_ai

    if abs_ai < min_abs:

        min_abs = abs_ai

if cnt_minus % 2 == 0 or 0 in a:

    print(sum_abs)

else:

    print((sum_abs - 2*min_abs))
# knk_kei  0 in a の条件は不要 

n = int(eval(input()))

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

if len([i for i in a if i < 0]) % 2 == 0:

    print((sum([abs(i) for i in a])))

else:

    print((sum([abs(i) for i in a]) - 2*min([abs(i) for i in a])))
n = int(eval(input()))
a = [int(i) for i in input().split()]
sum_abs, min_abs, cnt_minus = 0, 10**9, 0
for ai in a:
    if ai < 0:
        cnt_minus += 1
    abs_ai = abs(ai)
    sum_abs += abs_ai
    if abs_ai < min_abs:
        min_abs = abs_ai
if cnt_minus % 2 == 0 or 0 in a:
    print(sum_abs)
else:
    print((sum_abs - 2 * min_abs))

# knk_kei  0 in a の条件は不要
n = int(eval(input()))
a = [int(i) for i in input().split()]
if len([i for i in a if i < 0]) % 2 == 0:
    print((sum([abs(i) for i in a])))
else:
    print((sum([abs(i) for i in a]) - 2 * min([abs(i) for i in a])))

+# knk_kei  0 in a の条件は不要 -sum_abs, min_abs, cnt_minus = 0, 10**9, 0 -for ai in a: -    if ai < 0: -        cnt_minus += 1 -    abs_ai = abs(ai) -    sum_abs += abs_ai -    if abs_ai < min_abs: -        min_abs = abs_ai -if cnt_minus % 2 == 0 or 0 in a: -    print(sum_abs) +if len([i for i in a if i < 0]) % 2 == 0: +    print((sum([abs(i) for i in a]))) -    print((sum_abs - 2 * min_abs)) +    print((sum([abs(i) for i in a]) - 2 * min([abs(i) for i in a])))