import numpy as np

n=int(eval(input()))

a=np.array([int(i) for i in input().split()])



if sum(a<0)%2==0: print((sum(abs(a))))

else: print((sum(abs(a))-2*abs(a[(np.argmin(abs(a)))])))
n=int(eval(input()))

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



n_nega = sum(aa<0 for aa in a)

sumabs = sum(abs(aa) for aa in a)

if n_nega%2==0:

    print(sumabs)

else:

    mi=min( abs(aa) for aa in a)

    print((sumabs-mi*2))
import numpy as np

n = int(eval(input()))
a = np.array([int(i) for i in input().split()])
if sum(a < 0) % 2 == 0:
    print((sum(abs(a))))
else:
    print((sum(abs(a)) - 2 * abs(a[(np.argmin(abs(a)))])))

n = int(eval(input()))
a = list(map(int, input().split()))
n_nega = sum(aa < 0 for aa in a)
sumabs = sum(abs(aa) for aa in a)
if n_nega % 2 == 0:
    print(sumabs)
else:
    mi = min(abs(aa) for aa in a)
    print((sumabs - mi * 2))

-import numpy as np - -a = np.array([int(i) for i in input().split()]) -if sum(a < 0) % 2 == 0: -    print((sum(abs(a)))) +a = list(map(int, input().split())) +n_nega = sum(aa < 0 for aa in a) +sumabs = sum(abs(aa) for aa in a) +if n_nega % 2 == 0: +    print(sumabs) -    print((sum(abs(a)) - 2 * abs(a[(np.argmin(abs(a)))]))) +    mi = min(abs(aa) for aa in a) +    print((sumabs - mi * 2))