fun main(args: Array<String>) {
	readLine()
	val a = (readLine() ?: return).split(" ").map { it.toInt() }.toIntArray()
	var flag = false
	var sum = 0L
	var min = Int.MAX_VALUE
	for (v in a) {
		sum += Math.abs(v)
		if (v < 0) flag = !flag
		if (Math.abs(v) < min) min = Math.abs(v)
	}
	if (flag) sum -= 2 * min
	println(sum)
}