"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const A = arg[1].split(" ").map(n=>parseInt(n));
    
    const sum = A.reduce((m,n)=>Math.abs(m)+Math.abs(n));
    const minus = A.filter(n=>n < 0);
    const minAbs = A.map(n=>Math.abs(n)).sort((a,b)=>a-b)[0];
    
    // console.log(sum)

    if(minus.length % 2 !== 0) {
        console.log(sum - (minAbs * 2));
    } else {
        console.log(sum);
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));