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

    if b < mi:

        mi = b

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

def main():

    _ = eval(input())

    A = tuple(map(int, input().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
    if b < mi:
        mi = b
print((r - mi * 2 * (m % 2)))

def main():
    _ = eval(input())
    A = tuple(map(int, input().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 +def main(): +    _ = eval(input()) +    A = tuple(map(int, input().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))) -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 -    if b < mi: -        mi = b -print((r - mi * 2 * (m % 2))) + +if __name__ == "__main__": +    main()