readline(); let data = readline().split(' '); data = data.map(val => parseInt(val)); data.sort((v1, v2) => v1 - v2); const head = data[0], tail = data[data.length - 1]; data = data.map(val => Math.abs(val)); let sum = data.reduce((pre, cur) => pre + cur); if (head > 0 || tail < 0) { sum -= data[0] * 2; print(sum); }else { print(sum); }