function Main(input){ 
  var N = input.split(" ")[0];
  var L = input.split(" ")[1];
  N = parseInt(N,10);
  L = parseInt(L,10);
  var taste = [];
  var tasteSum = 0;
  for(i=0;i<=(N-1);i++){
    tasteSum += (L + (i+1) - 1); 
    taste[i] = Math.abs(L + (i+1) - 1); 
  }
  var min = Math.min(...taste);
  var ind = taste.indexOf(min,0);
  tasteSum -= (L + (ind+1) - 1);
  console.log(tasteSum);

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