n = int(eval(input()))

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



if 0 in lis:

    ans = 0

    for i in lis:

        if i < 0:

            ans += -1 * i

        else:

            ans += i

    print(ans)

    exit()



minus = [0]*n

for i in range(n):

    if lis[i] < 0:

        minus[i] = 1



if sum(minus) % 2 == 0:

    ans = 0

    for i in lis:

        if i < 0:

            ans += -1 * i

        else:

            ans += i

    print(ans)

else:

    ans = 0

    m = 10**9+1

    for i in lis:

        if i < 0:

            ans += -1*i

        else:

            ans += i

        m = min(m, abs(i))

    print((ans - 2*m))

n = int(eval(input()))

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



minus = 0

for i in range(n):

    if lis[i] < 0:

        minus += 1

        lis[i] = lis[i]*-1



if 0 in lis or minus % 2 == 0:

    print((sum(lis)))

else:

    print((sum(lis) - 2*min(lis)))
n = int(eval(input()))
lis = list(map(int, input().split()))
if 0 in lis:
    ans = 0
    for i in lis:
        if i < 0:
            ans += -1 * i
        else:
            ans += i
    print(ans)
    exit()
minus = [0] * n
for i in range(n):
    if lis[i] < 0:
        minus[i] = 1
if sum(minus) % 2 == 0:
    ans = 0
    for i in lis:
        if i < 0:
            ans += -1 * i
        else:
            ans += i
    print(ans)
else:
    ans = 0
    m = 10**9 + 1
    for i in lis:
        if i < 0:
            ans += -1 * i
        else:
            ans += i
        m = min(m, abs(i))
    print((ans - 2 * m))

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

-if 0 in lis: -    ans = 0 -    for i in lis: -        if i < 0: -            ans += -1 * i -        else: -            ans += i -    print(ans) -    exit() -minus = [0] * n +minus = 0 -        minus[i] = 1 -if sum(minus) % 2 == 0: -    ans = 0 -    for i in lis: -        if i < 0: -            ans += -1 * i -        else: -            ans += i -    print(ans) +        minus += 1 +        lis[i] = lis[i] * -1 +if 0 in lis or minus % 2 == 0: +    print((sum(lis))) -    ans = 0 -    m = 10**9 + 1 -    for i in lis: -        if i < 0: -            ans += -1 * i -        else: -            ans += i -        m = min(m, abs(i)) -    print((ans - 2 * m)) +    print((sum(lis) - 2 * min(lis)))