import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val n = scanner.nextInt()
    val a = IntArray(n)
    var sum: Long = 0
    var cnt = 0
    var zero = 0
    for (i in 0 until n) {
        a[i] = scanner.nextInt()
        if (a[i] < 0) {
            cnt++
            a[i] = Math.abs(a[i])
        } else if (a[i] == 0) zero++
        sum += a[i]
    }
    println(
        if (cnt % 2 == 0) sum
        else if (cnt % 2 == 1 && zero > 0) sum
        else sum - 2 * a.min()!!
    )
}
