function Main(input) {

  var input = input.split("\n");
  var input = input[0].split(" ").map(val => parseInt(val, 10)).slice(0, 2);
  var n = input[0];
  var l = input[1];
  var count = 0;
  var diff = new Array();
  var index = 0;

  var apples = new Array();
  for(var i=1; i<=n;i++){
    var azi = l + i - 1;
    apples.push(azi);
    count = count + azi;
  }
  apples.forEach(function(val, g) {
    diff[g] = Math.abs(0 - val);
    index = (diff[index] < diff[g]) ? index : g;
  });

  var val = apples[index];
  console.log(count - val);

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