#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, L, a, sum = 0, e = 10000;
  cin >> n >> L;
  for (int i = 1; i <= n; i++) {
    a = L + i - 1;
    sum += a;
    if (abs(a) < abs(e)) e = a;
  }
  cout << sum - e << endl;
}