import math

import re



n = int(input())

a = input().split()



cnt = 0

minus = 0

b = []

for i in a:

    a[cnt] = int(i)

    b.append(abs(int(i)))

    if a[cnt] < 0:

        minus += 1

    cnt += 1





if minus % 2 != 0:

    mini = min(b)

else:

    mini = 0



total = 0

for i in b:

    total += abs(i)



total -= 2 * abs(mini)

print(total)
# coding:utf-8                                                                                         



import math

                                                                                                       

def main(n,a):                                                                                         

    n = int(n)                                                                                         

    a = a.split()

    cnt = 0

    minus = 0                                                                                          

    b = []                                                                                             

    for i in a:                                                                                        

        a[cnt] = int(i)                                                                                

        b.append(abs(int(i)))                                                                          

        if a[cnt] < 0:

            minus += 1                                                                                 

        cnt += 1 

    if minus % 2 != 0: 

        mini = min(b)                                                                                  

    else:       

        mini = 0 

    total = 0   

    for i in b: 

        total += abs(i)

    total -= 2 * abs(mini)                                                                             

    print(total)     

    return total

                                                                                                       

if __name__ == "__main__":                                                                             

    n = input()

    a = input()                                                                                    

    main(n,a)
import math
import re

n = int(input())
a = input().split()
cnt = 0
minus = 0
b = []
for i in a:
    a[cnt] = int(i)
    b.append(abs(int(i)))
    if a[cnt] < 0:
        minus += 1
    cnt += 1
if minus % 2 != 0:
    mini = min(b)
else:
    mini = 0
total = 0
for i in b:
    total += abs(i)
total -= 2 * abs(mini)
print(total)

# coding:utf-8
import math


def main(n, a):
    n = int(n)
    a = a.split()
    cnt = 0
    minus = 0
    b = []
    for i in a:
        a[cnt] = int(i)
        b.append(abs(int(i)))
        if a[cnt] < 0:
            minus += 1
        cnt += 1
    if minus % 2 != 0:
        mini = min(b)
    else:
        mini = 0
    total = 0
    for i in b:
        total += abs(i)
    total -= 2 * abs(mini)
    print(total)
    return total


if __name__ == "__main__":
    n = input()
    a = input()
    main(n, a)

+# coding:utf-8 -import re -n = int(input()) -a = input().split() -cnt = 0 -minus = 0 -b = [] -for i in a: -    a[cnt] = int(i) -    b.append(abs(int(i))) -    if a[cnt] < 0: -        minus += 1 -    cnt += 1 -if minus % 2 != 0: -    mini = min(b) -else: -    mini = 0 -total = 0 -for i in b: -    total += abs(i) -total -= 2 * abs(mini) -print(total) + +def main(n, a): +    n = int(n) +    a = a.split() +    cnt = 0 +    minus = 0 +    b = [] +    for i in a: +        a[cnt] = int(i) +        b.append(abs(int(i))) +        if a[cnt] < 0: +            minus += 1 +        cnt += 1 +    if minus % 2 != 0: +        mini = min(b) +    else: +        mini = 0 +    total = 0 +    for i in b: +        total += abs(i) +    total -= 2 * abs(mini) +    print(total) +    return total + + +if __name__ == "__main__": +    n = input() +    a = input() +    main(n, a)