local N = io.read("n")
local A = {} for i=1,N do A[i] = io.read("n") end

local minus = false
local abs_min = 1000000001
local abs_sum = 0
for i=1,N do
    if A[i] < 0 then
        minus = not minus
    end
    abs_min = math.min(abs_min, math.abs(A[i]))
    abs_sum = abs_sum + math.abs(A[i])
end
local ans = abs_sum
if minus then
    ans = ans - 2 * abs_min
end
--print(minus, abs_min, abs_sum)
print(ans)
