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

int main() {
  int n, l;
  cin >> n >> l;
  int ans = 0, eat = l;
  for(int i = 2; i <= n; i++) {
    if(abs(l+i-1)<abs(eat)) eat = l+i-1;
  }
  ans = n*(l-1)+n*(n+1)/2 - eat;
  cout << ans;
}