from sys import stdin



readline = stdin.readline



n = readline()

aa = list(map(int, readline().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():

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

 

    bb = tuple(map(abs, aa))

    m = tuple(a for a in aa if a < 0)

    print((sum(bb) - min(bb)*2*(len(m)%2)))

 

 

if __name__ == "__main__":

    main()
from sys import stdin

readline = stdin.readline
n = readline()
aa = list(map(int, readline().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():
    _, *aa = list(map(int, open(0).read().split()))
    bb = tuple(map(abs, aa))
    m = tuple(a for a in aa if a < 0)
    print((sum(bb) - min(bb) * 2 * (len(m) % 2)))


if __name__ == "__main__":
    main()

-from sys import stdin +def main(): +    _, *aa = list(map(int, open(0).read().split())) +    bb = tuple(map(abs, aa)) +    m = tuple(a for a in aa if a < 0) +    print((sum(bb) - min(bb) * 2 * (len(m) % 2))) -readline = stdin.readline -n = readline() -aa = list(map(int, readline().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()