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

c,m=0,abs(a[0])

for i in range(n):

  if a[i]<0:c+=1

  m=min(abs(a[i]),m)

ans=0

for i in range(n):ans+=abs(a[i])

if not(m==0 or c%2==0):ans-=m*2

print(ans)
n=int(eval(input()))

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

if 0 in a:

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

else:

  pc=mc=0

  for i in range(n):

    if a[i]>0:pc+=1

    else:mc+=1

    a[i]=abs(a[i])

  if mc%2:print((sum(a)-min(a)*2))

  else:print((sum(a)))
n, a = int(eval(input())), list(map(int, input().split()))
c, m = 0, abs(a[0])
for i in range(n):
    if a[i] < 0:
        c += 1
    m = min(abs(a[i]), m)
ans = 0
for i in range(n):
    ans += abs(a[i])
if not (m == 0 or c % 2 == 0):
    ans -= m * 2
print(ans)

n = int(eval(input()))
a = list(map(int, input().split()))
if 0 in a:
    print((sum(abs(i) for i in a)))
else:
    pc = mc = 0
    for i in range(n):
        if a[i] > 0:
            pc += 1
        else:
            mc += 1
        a[i] = abs(a[i])
    if mc % 2:
        print((sum(a) - min(a) * 2))
    else:
        print((sum(a)))

-n, a = int(eval(input())), list(map(int, input().split())) -c, m = 0, abs(a[0]) -for i in range(n): -    if a[i] < 0: -        c += 1 -    m = min(abs(a[i]), m) -ans = 0 -for i in range(n): -    ans += abs(a[i]) -if not (m == 0 or c % 2 == 0): -    ans -= m * 2 -print(ans) +n = int(eval(input())) +a = list(map(int, input().split())) +if 0 in a: +    print((sum(abs(i) for i in a))) +else: +    pc = mc = 0 +    for i in range(n): +        if a[i] > 0: +            pc += 1 +        else: +            mc += 1 +        a[i] = abs(a[i]) +    if mc % 2: +        print((sum(a) - min(a) * 2)) +    else: +        print((sum(a)))