n = int(eval(input()))

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

neg = 0

mini = 1000000000000000000000000000

s = 0

for i in range(n):

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

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

    s += abs(a[i])

print((s if neg % 2 == 0 else s - mini*2))
# n = int(input())

n=eval(input())

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

# neg = 0

# mini = 1000000000000000000000000000

# s = 0

# for i in range(n):

#     if a[i] < 0: neg += 1

#     mini = min(mini, abs(a[i]))

#     s += abs(a[i])

# print(s if neg % 2 == 0 else s - mini*2)



# print(sum(abs(x for x in a))-2*min(abs(x for x in a))if sum([x<0 for x in a])%2else sum(abs(x)for x in a))

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

print((sum(b)-2*min(b)if sum(x<0for x in a)%2else sum(b)))
n = int(eval(input()))
a = list(map(int, input().split()))
neg = 0
mini = 1000000000000000000000000000
s = 0
for i in range(n):
    if a[i] < 0:
        neg += 1
    mini = min(mini, abs(a[i]))
    s += abs(a[i])
print((s if neg % 2 == 0 else s - mini * 2))

# n = int(input())
n = eval(input())
a = list(map(int, input().split()))
# neg = 0
# mini = 1000000000000000000000000000
# s = 0
# for i in range(n):
#     if a[i] < 0: neg += 1
#     mini = min(mini, abs(a[i]))
#     s += abs(a[i])
# print(s if neg % 2 == 0 else s - mini*2)
# print(sum(abs(x for x in a))-2*min(abs(x for x in a))if sum([x<0 for x in a])%2else sum(abs(x)for x in a))
b = [abs(x) for x in a]
print((sum(b) - 2 * min(b) if sum(x < 0 for x in a) % 2 else sum(b)))

-n = int(eval(input())) +# n = int(input()) +n = eval(input()) -neg = 0 -mini = 1000000000000000000000000000 -s = 0 -for i in range(n): -    if a[i] < 0: -        neg += 1 -    mini = min(mini, abs(a[i])) -    s += abs(a[i]) -print((s if neg % 2 == 0 else s - mini * 2)) +# neg = 0 +# mini = 1000000000000000000000000000 +# s = 0 +# for i in range(n): +#     if a[i] < 0: neg += 1 +#     mini = min(mini, abs(a[i])) +#     s += abs(a[i]) +# print(s if neg % 2 == 0 else s - mini*2) +# print(sum(abs(x for x in a))-2*min(abs(x for x in a))if sum([x<0 for x in a])%2else sum(abs(x)for x in a)) +b = [abs(x) for x in a] +print((sum(b) - 2 * min(b) if sum(x < 0 for x in a) % 2 else sum(b)))