function main(input) {
  const s = input.split("\n");

  const N = parseInt(s[0]);
  const AS = s[1].split(" ").map(function(n) { return parseInt(n, 10); });

  for(var i=0; i<N-1; i++) {
    if(AS[i] < 0 && Math.abs(AS[i]) > AS[i+1]) {
      AS[i] *= -1;
      AS[i+1] *= -1;
    }
  }

  var sum = 0;

  for(var i=0; i<N; i++) {
    sum += AS[i];
  }

  console.log(sum);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
