# -*- coding: utf-8 -*-

n = int(eval(input()))

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



ans = 0

count = 0

for i in range(n):

    if a[i] < 0:

        a[i] = -a[i]

        count += 1

    ans += a[i]



if count % 2 == 0:

    print(ans)

else:

    print((ans - min(a) * 2))

# -*- coding: utf-8 -*-

n = int(eval(input()))

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



count = 0

for i in range(n):

    if a[i] < 0:

        a[i] = -a[i]

        count += 1



ans = sum(a)

if count % 2 == 0:

    print(ans)

else:

    print((ans - min(a) * 2))

# -*- coding: utf-8 -*-
n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
count = 0
for i in range(n):
    if a[i] < 0:
        a[i] = -a[i]
        count += 1
    ans += a[i]
if count % 2 == 0:
    print(ans)
else:
    print((ans - min(a) * 2))

# -*- coding: utf-8 -*-
n = int(eval(input()))
a = list(map(int, input().split()))
count = 0
for i in range(n):
    if a[i] < 0:
        a[i] = -a[i]
        count += 1
ans = sum(a)
if count % 2 == 0:
    print(ans)
else:
    print((ans - min(a) * 2))

-ans = 0 -    ans += a[i] +ans = sum(a)