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

    val minus = a.count { it<0L }
    val absScore = a.map{ Math.abs(it) }.sum()
    val absMin = a.map { Math.abs(it) }.min()!!
    println( if(minus%2==1) (absScore - absMin * 2) else absScore )

}