n = int(eval(input()))

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

pa = []

cnt = 0

for s in a:

    if s < 0:

        cnt += 1

    pa.append(abs(s))

if cnt % 2:

    print((sum(pa) - 2 * min(pa)))

else:

    print((sum(pa)))

    
n = int(eval(input()))

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

pa = [abs(s) for s in a]

cnt = sum([s < 0 for s in a])

if cnt % 2:

    print((sum(pa) - 2 * min(pa)))

else:

    print((sum(pa)))

n = int(eval(input()))
a = list(map(int, input().split()))
pa = []
cnt = 0
for s in a:
    if s < 0:
        cnt += 1
    pa.append(abs(s))
if cnt % 2:
    print((sum(pa) - 2 * min(pa)))
else:
    print((sum(pa)))

n = int(eval(input()))
a = list(map(int, input().split()))
pa = [abs(s) for s in a]
cnt = sum([s < 0 for s in a])
if cnt % 2:
    print((sum(pa) - 2 * min(pa)))
else:
    print((sum(pa)))

-pa = [] -cnt = 0 -for s in a: -    if s < 0: -        cnt += 1 -    pa.append(abs(s)) +pa = [abs(s) for s in a] +cnt = sum([s < 0 for s in a])