"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));
   let ans = [];
   let pai = xs[1];
   for(let i = 0; i < xs[0]; i++){
     ans.push(pai + i);
   }
   let ans1 = 0;
   for(let i = 0; i < xs[0]; i++){
     ans1 = (ans1 + ans[i]);
    }
   
   let ans2 = [];
   for(let i = 0; i < xs[0]; i++){
    ans2.push(Math.abs(ans[i]));
   }
   const compare = (a, b)=>{ 
   return a - b;  
   }
   ans2.sort(compare);    
   //console.log(ans2);
   if(ans[0]>0){
   console.log(ans1-ans2[0]);
   }else if(ans[0]<=0){
   console.log(ans1-(-ans2[0]));
   }      
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));