local n=io.read("n")
local zero=false
local even=0
local min=10^9+1
local total=0
for i=1,n do
    local input=io.read("n")
    zero=(input==0 or zero)
    even=(input<0 and even+1 or even)
    local absinput=math.abs(input)
    min=math.min(absinput,min)
    total=total+absinput
end

if even%2==0 or zero then
    print(total)
else
    print(total-2*min)
end