import java.util.Scanner

object Main extends App  {
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val al = Vector.fill(n)(sc.nextLong)

  val abs = al.map(Math.abs)
  val sum = abs.sum

  val res =
    if(al.count(_ < 0) % 2 == 0) sum
    else {
      val minus = abs.min
      sum - 2 * minus
    }

  println(res)
}
