function main(input) {
	var result = 0;
	var l = input.split("\n")[1].split(" ");
	l = l.map(n => {
		return +n;
	});
	f(l).forEach(n => {
		result += n;
	});
	console.log(result);
}
function f(l) {
	var flg = true;
	for(var i = 0; i < l.length; i ++) {
		if(l[i] < 0) {
			if(i == l.length - 1 && (l[i-1] <= 0 || z(l[i]) >= z(l[i-1]))) {
				flg = false;
				l[i] = l[i] * -1;
				l[i-1] = l[i-1] * -1;
			} else if(l[i+1] <= 0 || z(l[i]) >= z(l[i+1])) {
				flg = false;
				l[i] = l[i] * -1;
				l[i+1] = l[i+1] * -1;
			}
		}
	}
	if(flg) {
		return l;
	} else {
		return f(l);
	}
}
function z(x) {
	return x < 0 ? -1 * x : x;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));