fun main(args: Array<String>) {
    abc125d()
}

fun abc125d() {
    val n = readLine()!!.toInt()
    val aList = readLine()!!.split(" ").map { it.toLong() }

    val negValCount = aList.count { it < 0 }
    val absList = aList.map { Math.abs(it) }.sorted()
    val minAbs = absList.first()

    val answer = if (negValCount % 2 == 0) absList.sum() else absList.drop(1).sum() - minAbs

    println(answer)
}
