

function Main(input) {
  input = input.split("\n");
  var N = parseInt(input[0].split(" ")[0]);
  var L = parseInt(input[0].split(" ")[1]);
  var sum=0;
  var min=10000;
  for(var i=0;i<N;i++){
    sum+=(L+i-1);
    min=Math.min(min,Math.abs(L+i-1));
  }
  var ans=sum-min;

  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));