import java.util.*
import java.math.*
fun main(args: Array<String>) {

    var N = readLine()!!.toInt()
    var A = readLine()!!.split(" ").map{it.toLong()}

    //val S = readLine()!!
    var ans = 0L;
    var min =1000000001L
    var count = 0
    for (a in A) {
        var b = a
        if (b < 0) {
            count++
            b = -a
        }
        ans += b
        if (min > b) min = b
    }

    if (count %2 == 1) ans -= 2*min

    println(ans)
}