
function Main(input) {
    var N = parseInt(input[0], 10);
    var L = parseInt(input[1], 10);

    var abs = 10000;
    var eat = 0;
    var sum = 0;

    for (var i = 0; i < N; i++) {
        if (Math.abs(L + i) < abs) {
            abs = Math.abs(L + i);
            eat = (L + i);
        }
        sum = sum + (L + i);
    }

    console.log(sum - eat);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));