import java.util.*

fun main(args:Array<String>){
    val n = readLine()!!.toInt()
    val a = readLine()!!.split(" ").map{it.toInt()}
    var cnt = a.count{it < 0}
    val ans = a.map{Math.abs(it.toLong())}.sum()
    val mi = a.map{Math.abs(it)}.reduce{i1, i2 -> Math.min(i1, i2)}
    println(if(cnt % 2 == 1) ans - mi * 2 else ans)
}
