fun main(args: Array<String>) {
    val N = nextInt()
    val A = listOfInt()
    val B = A.map { if (it < 0) -it else it }
    val sum = B.sumByDouble { it.toDouble() }.toLong()
    val min = B.min()!!
    val fu = A.count { it < 0 }
    val ans = if (fu % 2 == 1) sum - min * 2 else sum
    println(ans)
}
fun next() = readLine()!!
fun nextInt(delta: Int = 0) = Integer.parseInt(next()) + delta
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map(String::toInt)