import java.util.*

fun solveFlippingSigns() {

    val sc = Scanner(System.`in`)
    val length: Int = sc.nextInt()
    val list = mutableListOf<Long>()
    var buf: Long = 0
    var minus = 0
    var answer: Long = 0

    for (x in 0 until length) {
        buf = sc.nextLong()
        if (buf < 0) {
            minus++
            buf *= -1;
        }
        list.add(buf)
    }

    val sum = list.sum()
    val min = list.min() ?: 0

    if (minus % 2 == 0) {
        answer = sum
    } else {
        answer = (sum - (2 * min))
    }

    println(answer)

}


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