fun main(args: Array<String>) {
    readLine()
    val a = readLine()!!.split(" ").map { it.toLong() }
    val negativeCount = a.count { it < 0L }
    val min = a.map { Math.abs(it) }.min()!!
    var sum = a.map { Math.abs(it) }.sum()
    println(if (negativeCount % 2 == 0) sum else sum - 2 * min)
}