local ior = io.read
local n = ior("*n")
local t = {}
local minus = 0
for i = 1, n do
  local a = ior("*n")
  if(a < 0) then minus = minus + 1 end
  t[i] = a
end
table.sort(t)
local ma = math.abs
if(minus % 2 == 0) then
  local sum = 0
  for i = 1, n do
    sum = sum + ma(t[i])
  end
  print(sum)
else
  local sum = 0
  for i = 1, minus - 1 do
    sum = sum + ma(t[i])
  end
  if(minus < n) then
    sum = sum + ma(t[minus + 1] + t[minus])
  else
    sum = sum + t[minus]
  end
  for i = minus + 2, n do
    sum = sum + t[i]
  end
  print(sum)
end
