from sys import stdin



readline = stdin.readline



_, *aa = list(map(int, open(0).read().split()))

r = 0

mi = 1000000000

m = 0

for a in aa:

    if a < 0:

        m += 1

    b = abs(a)

    r += b

    mi = min(b, mi)

print((r - mi * 2 * (m % 2)))

from sys import stdin

 

readline = stdin.readline

 

def main():

    _, *A = list(map(int, open(0).read().split()))

 

    B = tuple(map(abs, A))

    C = tuple(a for a in A if a < 0)

    print((sum(B) - min(B)*2*(len(C)%2)))

 

 

if __name__ == "__main__":

    main()
from sys import stdin

readline = stdin.readline
_, *aa = list(map(int, open(0).read().split()))
r = 0
mi = 1000000000
m = 0
for a in aa:
    if a < 0:
        m += 1
    b = abs(a)
    r += b
    mi = min(b, mi)
print((r - mi * 2 * (m % 2)))

from sys import stdin

readline = stdin.readline


def main():
    _, *A = list(map(int, open(0).read().split()))
    B = tuple(map(abs, A))
    C = tuple(a for a in A if a < 0)
    print((sum(B) - min(B) * 2 * (len(C) % 2)))


if __name__ == "__main__":
    main()

-_, *aa = list(map(int, open(0).read().split())) -r = 0 -mi = 1000000000 -m = 0 -for a in aa: -    if a < 0: -        m += 1 -    b = abs(a) -    r += b -    mi = min(b, mi) -print((r - mi * 2 * (m % 2))) + + +def main(): +    _, *A = list(map(int, open(0).read().split())) +    B = tuple(map(abs, A)) +    C = tuple(a for a in A if a < 0) +    print((sum(B) - min(B) * 2 * (len(C) % 2))) + + +if __name__ == "__main__": +    main()