n = gets.to_i
as = gets.split(' ').map(&:to_i)
abs_min = 1000000000
count = 0
sum = 0
as.each do |a|
    if a <= 0
        count += 1
    end
    sum += a.abs
    abs_min = a.abs if a.abs <= abs_min
end
if (count%2 == 1 and as[n-1] <= 0) or (count%2 == 0 and as[n-1] >= 0)
    ans = sum
elsif (count%2 == 1 and as[n-1] > 0) or (count%2 == 0 and as[n-1] < 0)
    ans = sum - abs_min*2
end
puts ans
