n = int(eval(input()))

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

b = []

minus = 0

for i in range(n):

  if a[i] < 0:

    minus += 1

  b.append(abs(a[i]))

b.sort()

if minus % 2 == 0:

  print((sum(b)))

else:

  print((sum(b) - 2 * b[0]))
#14:20

n = int(eval(input()))

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

cnt = 0

for i in range(n):

  if a[i] < 0:

    cnt += 1

    a[i] *= -1

a.sort()

if cnt % 2 == 0:

  print((sum(a)))

else:

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

# 14:20
n = int(eval(input()))
a = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if a[i] < 0:
        cnt += 1
        a[i] *= -1
a.sort()
if cnt % 2 == 0:
    print((sum(a)))
else:
    print((sum(a) - 2 * a[0]))

+# 14:20 -b = [] -minus = 0 +cnt = 0 -        minus += 1 -    b.append(abs(a[i])) -b.sort() -if minus % 2 == 0: -    print((sum(b))) +        cnt += 1 +        a[i] *= -1 +a.sort() +if cnt % 2 == 0: +    print((sum(a))) -    print((sum(b) - 2 * b[0])) +    print((sum(a) - 2 * a[0]))