"use strict";
process.stdin.resume();
process.stdin.setEncoding('utf8');
let input = '';

process.stdin.on('data', function(chunk) {
  input += chunk;
}).on('end', function() {
  input = input.trim().split(" ").map(v => parseInt(v));
  const N = input[0];
  const L = input[1];
  const array = [];
  for (let i = 0; i < N; i++) {
    array[i] = L + i;
  }
  let tmp = 0;
  for (let i = 0; i < N; i++) {
    tmp = Math.abs(array[tmp]) > Math.abs(array[i]) ? i : tmp;
  }
  const sum = array.reduce((pre, curr) => pre + curr, 0);
  const result = sum - array[tmp];
  console.log(result);
});