

n = int(eval(input()))

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

ma = []

pa = []

l =[]

t = 0

k  = 0

for i in a:

  if i < 0:

    ma.append(i)

    l.append(i*-1)

    k+=1

  elif i> 0:

    pa.append(i)

    l.append(i)

  else:

    t = 1

s = sum(l)

print((s  if t == 1 or k%2==0 else s - 2*min(l)))
#写経



n=eval(input())

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

b=[abs(x)for x in a]



#sum(x<0 for x in a)%2 ここで負の値の個数数えてるのが！

print((sum(b)-2*min(b)if sum(x<0 for x in a)%2 else sum(b)))
n = int(eval(input()))
a = list(map(int, input().split()))
ma = []
pa = []
l = []
t = 0
k = 0
for i in a:
    if i < 0:
        ma.append(i)
        l.append(i * -1)
        k += 1
    elif i > 0:
        pa.append(i)
        l.append(i)
    else:
        t = 1
s = sum(l)
print((s if t == 1 or k % 2 == 0 else s - 2 * min(l)))

# 写経
n = eval(input())
a = list(map(int, input().split()))
b = [abs(x) for x in a]
# sum(x<0 for x in a)%2 ここで負の値の個数数えてるのが！
print((sum(b) - 2 * min(b) if sum(x < 0 for x in a) % 2 else sum(b)))

-n = int(eval(input())) +# 写経 +n = eval(input()) -ma = [] -pa = [] -l = [] -t = 0 -k = 0 -for i in a: -    if i < 0: -        ma.append(i) -        l.append(i * -1) -        k += 1 -    elif i > 0: -        pa.append(i) -        l.append(i) -    else: -        t = 1 -s = sum(l) -print((s if t == 1 or k % 2 == 0 else s - 2 * min(l))) +b = [abs(x) for x in a] +# sum(x<0 for x in a)%2 ここで負の値の個数数えてるのが！ +print((sum(b) - 2 * min(b) if sum(x < 0 for x in a) % 2 else sum(b)))