fun main(args: Array<String>) {
  val n = Integer.parseInt(readLine() ?: "0")
  val alist = readLine()?.split(" ") ?: listOf()
  val a = alist.map{it.toLong()}
  val minnum = a.filter{it < 0}.size
  if(minnum % 2 == 0) {
    println(a.map{Math.abs(it)}.sum())
  } else {
    val s: Long = a.map{Math.abs(it)}.sum()?.toLong() ?: 0
    val m: Long = a.map{Math.abs(it)}.min()?.toLong() ?: 0
    println(s - m * 2)
  }
}