fun main(args : Array<String>) {
    val n = readLine()!!.toInt()
    val aa = readLine()!!.split(" ").map { it.toLong() }

    if (aa.count { it < 0 } % 2 == 0) {
        println(aa.map { Math.abs(it) }.sum())
    } else {
        var min = Long.MAX_VALUE
        aa.forEach {
            min = Math.min(min, Math.abs(it))
        }
        println(aa.map { Math.abs(it) }.sum() - 2L * min)
    }
}