#include<cstdio>
#include<algorithm>
using namespace std;
int n,l,sum;
int main(){
	scanf("%d%d",&n,&l);
	if(l>=0)sum-=l;
	else if(l+n-1>=0)sum-=0;
	else if(l+n-1<0)sum-=l+n-1;
	for(int i=1;i<=n;i++)
		sum+=l+i-1;
	printf("%d\n",sum);
}