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


int main()
{
	int n,l,ans=0,tmp=10000,t;
	scanf("%d%d",&n,&l);
	for(int i=1;i<=n;++i) ans+=l+i-1;
	for(int i=1;i<=n;++i) if(tmp>abs(l+i-1)) tmp=abs(l+i-1),t=l+i-1;
	printf("%d",ans-t);
}