import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;
import std.range;

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

void main(){
  auto nl = readNums!int;
  auto n = nl[0], l = nl[1];

  auto r = iota(l, l+n);
  auto sum = r.sum;

  int min = 1000;
  foreach(i; r){
    if(min.abs > i.abs) min = i;
  }

  writeln(sum - min);
}
