object Main extends App {
	val N = scala.io.StdIn.readInt
	val A = scala.io.StdIn.readLine.split(" ").map(_.toLong)

	val minus = A.count(_ < 0L) % 2

	val B = A.map(_.abs)

	val Asum = B.sum
	val Amin = B.toSet.min

	if(B.toSet.contains(0L) || minus == 0){
		println(Asum)
	}else{
		println(Asum - 2*Amin)
	}	
}