#include<iostream>
using namespace std;
int main(){
  int n,l;cin >> n >> l;
  if (l <= 0 && 0 <= l+n-1) cout << (l+l+n-1)*n/2 << endl;
  else if (l > 0) cout << ((l+l+n-1)*n)/2-l << endl;
  else cout << (l+l+n-1)*n/2-(l+n-1) << endl;
}