#!/usr/bin/env ruby

_n = gets.chomp.to_i
a = gets.chomp.split(' ').map(&:to_i)

min = 0
sum_all = a.map(&:abs).tap { |ary| min = ary.min }.inject(:+)
ans = (a.count { |aa| aa < 0 } % 2).zero? ? sum_all : sum_all - 2 * min

puts ans
