import java.util.Scanner


object Main {
  def read() = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val a = for (_ <- 0 until n) yield sc.nextLong()
    (n, a)
  }

  def solve(n: Int, a: IndexedSeq[Long]): Long = {
    val minabs = a.map(Math.abs).min
    val cntMinus = a.count(n => n < 0)
    if(cntMinus %2 == 0) a.map(Math.abs).sum
    else a.map(Math.abs).sum - 2 * minabs
  }

  def main(args: Array[String]): Unit = {
    val (n, a) = read()
    println(solve(n, a))
  }
}