n = int(eval(input()))

a_list = [int(i) for i in input().split()]

minus_count_even_flug = True

zero_exist_flug = False

  

for a in a_list:

    if a < 0:

        minus_count_even_flug = not minus_count_even_flug

    if a == 0:

        zero_exist_flug = True

     

a_abs_list = [abs(a) for a in a_list]

sum_a_abs_list = sum(a_abs_list)

if minus_count_even_flug or zero_exist_flug:

    print(sum_a_abs_list)

else:

    print((sum_a_abs_list - 2 * min(a_abs_list)))
N = int(eval(input()))

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

B = list(map(abs, A))

C = [a for a in A if a < 0]

if len(C) % 2 == 0:

    print((sum(B)))

else:

    print((sum(B) - min(B)*2))
n = int(eval(input()))
a_list = [int(i) for i in input().split()]
minus_count_even_flug = True
zero_exist_flug = False
for a in a_list:
    if a < 0:
        minus_count_even_flug = not minus_count_even_flug
    if a == 0:
        zero_exist_flug = True
a_abs_list = [abs(a) for a in a_list]
sum_a_abs_list = sum(a_abs_list)
if minus_count_even_flug or zero_exist_flug:
    print(sum_a_abs_list)
else:
    print((sum_a_abs_list - 2 * min(a_abs_list)))

N = int(eval(input()))
A = list(map(int, input().split()))
B = list(map(abs, A))
C = [a for a in A if a < 0]
if len(C) % 2 == 0:
    print((sum(B)))
else:
    print((sum(B) - min(B) * 2))

-n = int(eval(input())) -a_list = [int(i) for i in input().split()] -minus_count_even_flug = True -zero_exist_flug = False -for a in a_list: -    if a < 0: -        minus_count_even_flug = not minus_count_even_flug -    if a == 0: -        zero_exist_flug = True -a_abs_list = [abs(a) for a in a_list] -sum_a_abs_list = sum(a_abs_list) -if minus_count_even_flug or zero_exist_flug: -    print(sum_a_abs_list) +N = int(eval(input())) +A = list(map(int, input().split())) +B = list(map(abs, A)) +C = [a for a in A if a < 0] +if len(C) % 2 == 0: +    print((sum(B))) -    print((sum_a_abs_list - 2 * min(a_abs_list))) +    print((sum(B) - min(B) * 2))