int(eval(input()))

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

b=[abs(int(i)) for i in a]

c=[int(i) for i in a if i<0]

print((sum(b)-[0,min(b)*2][len(c)%2]))
n=int(eval(input()))

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

x=0

b=[]

for i in a:

  if i<0: x=x+1

  b.append(abs(i))

b.sort()

print((sum(b)-b[0]*2 if  x%2 else sum(b)))
int(eval(input()))
a = [int(i) for i in input().split()]
b = [abs(int(i)) for i in a]
c = [int(i) for i in a if i < 0]
print((sum(b) - [0, min(b) * 2][len(c) % 2]))

n = int(eval(input()))
a = [int(i) for i in input().split()]
x = 0
b = []
for i in a:
    if i < 0:
        x = x + 1
    b.append(abs(i))
b.sort()
print((sum(b) - b[0] * 2 if x % 2 else sum(b)))

-int(eval(input())) +n = int(eval(input())) -b = [abs(int(i)) for i in a] -c = [int(i) for i in a if i < 0] -print((sum(b) - [0, min(b) * 2][len(c) % 2])) +x = 0 +b = [] +for i in a: +    if i < 0: +        x = x + 1 +    b.append(abs(i)) +b.sort() +print((sum(b) - b[0] * 2 if x % 2 else sum(b)))