"use strict"

const main = (input) => {
    input = input.split(" ");
    const N = Number(input[0]);
    const L = Number(input[1]);

    const tastes = [];
    for (let i = 1; i <= N; i++) {
        const taste = L + i - 1;
        tastes.push(taste);
    }

    const absTastes = tastes.map(taste => Math.abs(taste));
    const minAbsTaste = Math.min(...absTastes);

    const allTastes = tastes.reduce((sum, taste) => sum + taste);

    if (allTastes > 0) {
        const ans = allTastes - minAbsTaste;
        console.log(ans);
    } else {
        const ans = allTastes + minAbsTaste;
        console.log(ans);
    }
}

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