import java.util.Scanner
import scala.math._

object Main {
  def main(args: Array[String]) = {
    val sc = new Scanner(System.in)
    val N = sc.nextInt()
    val As = List.fill(N)(sc.nextLong())
    val minusNum = As.count(_ < 0)
    val result =
      if (minusNum == 0 || minusNum %2 == 0) As.map(abs).sum
      else {
        As.map(abs).sum - As.map(abs).min*2
      }

    println(s"$result")
  }
}