fun main(args: Array<String>) {
    readLine()
    val a = readLine()!!.split(' ').map(String::toLong)
    val abs = a.map(Math::abs)
    val absmin = abs.min()!!
    val minusc = a.count { it < 0L }
    var ans = abs.sum()
    if (minusc and 1 == 1) {
        ans = ans - absmin - absmin
    }
    println(ans)
}
