N = int(eval(input()))

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



cnt = 0

zero = 0

for i in range(N):

        if A[i]<0:

            cnt+=1

        if A[i]==0:

            zero+=1



B = list(map(abs, A))

if (N-zero)%2==0:

    if cnt%2==0:

        print((sum(B)))

    else:

        print((sum(B)-2*min(B)))

else:

    if cnt%2==0:

        print((sum(B)))

    else:

        print((sum(B)-2*min(B)))
N = int(eval(input()))

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



if (List.count(0)!=0)|((sum(x<0 for x in List)%2==0)):

    print((sum([abs(List[i]) for i in range(N)])))



else:

    nList = [abs(List[i]) for i in range(N)]

    print((sum(nList)-2*min(nList)))
N = int(eval(input()))
A = list(map(int, input().split()))
cnt = 0
zero = 0
for i in range(N):
    if A[i] < 0:
        cnt += 1
    if A[i] == 0:
        zero += 1
B = list(map(abs, A))
if (N - zero) % 2 == 0:
    if cnt % 2 == 0:
        print((sum(B)))
    else:
        print((sum(B) - 2 * min(B)))
else:
    if cnt % 2 == 0:
        print((sum(B)))
    else:
        print((sum(B) - 2 * min(B)))

N = int(eval(input()))
List = list(map(int, input().split()))
if (List.count(0) != 0) | ((sum(x < 0 for x in List) % 2 == 0)):
    print((sum([abs(List[i]) for i in range(N)])))
else:
    nList = [abs(List[i]) for i in range(N)]
    print((sum(nList) - 2 * min(nList)))

-A = list(map(int, input().split())) -cnt = 0 -zero = 0 -for i in range(N): -    if A[i] < 0: -        cnt += 1 -    if A[i] == 0: -        zero += 1 -B = list(map(abs, A)) -if (N - zero) % 2 == 0: -    if cnt % 2 == 0: -        print((sum(B))) -    else: -        print((sum(B) - 2 * min(B))) +List = list(map(int, input().split())) +if (List.count(0) != 0) | ((sum(x < 0 for x in List) % 2 == 0)): +    print((sum([abs(List[i]) for i in range(N)]))) -    if cnt % 2 == 0: -        print((sum(B))) -    else: -        print((sum(B) - 2 * min(B))) +    nList = [abs(List[i]) for i in range(N)] +    print((sum(nList) - 2 * min(nList)))