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


    var sum1 = 0L
    if (A.filter { it < 0 }.size.mod(2) == 0) {
        (0..N-1).forEach {
            A[it] = Math.abs(A[it])
        }
        sum1 = A.sum()
    }

    (0..N-1).forEach {
        A[it] = Math.abs(A[it])
    }
    A.sort()
    A[0] = -1 * A[0]
    val sum2 = A.sum()

    println(listOf(sum1, sum2).max())
}