import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val n = in.readLine().toInt
    val as = in.readLine().split("\\s+").map(_.toLong)

    val absas = Array.ofDim[Long](n)

    var minAbsa = Long.MaxValue
    var nonPositiveCount = 0
    for (i <- as.indices) {
      val a = as(i)
      if (a <= 0) {
        nonPositiveCount += 1
      }
      val absa = Math.abs(a)
      absas(i) = absa
      minAbsa = Math.min(minAbsa, absa)
    }

    out.println(
      absas.sum - {
        if (nonPositiveCount % 2 == 0) {
          0
        } else {
          2 * minAbsa
        }
      }
    )

    out.flush()
  }
}
