n = int(input())
a = list(map(int, input().split()))
abs_list = []
count = 0
for i in range(n):
    abs_list.append(abs(a[i]))
    if a[i] < 0:
        count += 1
if count % 2 == 1:
    print(sum(abs_list) - min(abs_list) * 2)
else:
    print(sum(abs_list))

82fa103f8a6135130ec4995762356b4061ff8611
<mask token>

<mask token>
for i in range(n):
    abs_list.append(abs(a[i]))
    if a[i] < 0:
        count += 1
if count % 2 == 1:
    print(sum(abs_list) - min(abs_list) * 2)
else:
    print(sum(abs_list))

n = int(input())
a = list(map(int, input().split()))
abs_list = []
count = 0
for i in range(n):
    abs_list.append(abs(a[i]))
    if a[i] < 0:
        count += 1
if count % 2 == 1:
    print(sum(abs_list) - min(abs_list) * 2)
else:
    print(sum(abs_list))
