// inputに入力データ全体が入る
function Main(input) {
    input = input.split(" ");
    var N = parseInt(input[0],10);
    var L = parseInt(input[1],10);
    var aziSouwa = [];
    for(var i = 1; i < N+1; i++){
        aziSouwa.push(L + i - 1);
    }    
    var value = 0;
    var diff = [];
    var index = 0;

    aziSouwa.forEach(function(val,i){
    diff[i] = Math.abs(value - val);
    index = (diff[index] < diff[i]) ? index : i;
    });
    aziSouwa.splice(index,1);
    var souwa = aziSouwa.reduce(function(total, data){return total + data});
    console.log(souwa);
};
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));