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

    val minusCount = values.filter { it < 0 }.size
    val zeroCount = values.filter{ it == 0L }.size

    val flagCanAllPlus = zeroCount > 0 || minusCount % 2 == 0

    val flatValues = values.map { if (it < 0) -it else it }.sorted()

    val res = if (flagCanAllPlus) flatValues.sum() else flatValues.sum() - flatValues[0] * 2

    print(res)
}
