n = int(eval(input()))

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

m = sorted(list(map(abs,l)))

print((sum(m) - sum(i<0 for i in l)%2*m[0]*2))
n=int(eval(input()))

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

m=list(map(abs,l))

print((sum(m)-sum(i<0 for i in l)%2*min(m)*2))
n = int(eval(input()))
l = list(map(int, input().split()))
m = sorted(list(map(abs, l)))
print((sum(m) - sum(i < 0 for i in l) % 2 * m[0] * 2))

n = int(eval(input()))
l = list(map(int, input().split()))
m = list(map(abs, l))
print((sum(m) - sum(i < 0 for i in l) % 2 * min(m) * 2))

-m = sorted(list(map(abs, l))) -print((sum(m) - sum(i < 0 for i in l) % 2 * m[0] * 2)) +m = list(map(abs, l)) +print((sum(m) - sum(i < 0 for i in l) % 2 * min(m) * 2))