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

int main() {
	int N,L;
	cin >> N >> L;
	int sum=(L-1)*N+(1+N)*N/2;

	if(L>0) sum-=L;
	else if(L+N-1<0) sum-=L+N-1;
	cout << sum << endl;
}