"use strict";
    
const main = arg => {
  let Num = arg.split(" ")[0]*1;
  let tasteBase = arg.split(" ")[1]*1;
  let tastes = tasteBase;
  // 食べてない時の足し合わせ
  for(let i = 1; i < Num; i++){
  	tastes += (tasteBase+i);
  }
  if( tasteBase > 0 ) {
    tastes -= tasteBase;
  } else if( (tasteBase < 0) && (tasteBase + Num > 0)){
    // 便宜的に
	tastes = tastes;  
  } else if( (tasteBase < 0) && (tasteBase + Num < 0)){
    tastes -= (tasteBase + Num - 1);  
  }
  
  console.log(tastes);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
