'use strict'
const Main = (arg) => {
  let input = arg.trim().split('\n');
  let N = input[0].split(' ').map(Number)[0];
  let L = input[0].split(' ').map(Number)[1];
  let apple = [...Array(N).keys()].map(i => i + L);
  let eat = 0;
  let Ans = apple.reduce((ttl, data) => { return ttl + data });
  if (apple.indexOf(0) === -1) {
    if (apple[0] > 0) {
      eat = Math.min(...apple);
    } else if (apple[0] < 0) {
      eat = Math.max(...apple);
    }
  }
  Ans -= eat;
  console.log(Ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
