'use strict'
function main(input) {
    const tmp = input.split(" ");
    const N = parseInt(tmp[0], 10);
    const L = parseInt(tmp[1], 10);

    const serialNum = Array.from(new Array(N)).map((v, index) => index + 1);
    let tastes = serialNum.map((i) => L + i - 1);

    const absTastes = tastes.map((taste) => Math.abs(taste));
    const smallestAbsVal = absTastes.reduce((a, b) => Math.min(a, b));
    const smallestAbsValInd = absTastes.indexOf(smallestAbsVal);

    tastes.splice(smallestAbsValInd, 1);
    const totalTaste = tastes.reduce((sum, taste) => sum + taste);
    console.log(totalTaste);

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