#include <stdio.h>
 
int main() {
	int n, l, i, sum;
 
	scanf("%d%d", &n, &l);
	sum = 0;
	for (i = 1; i <= n; i++)
		sum += (l + i - 1);
	printf("%d\n", sum - (l > 0 ? l : (l + n - 1 >= 0 ? 0 : l + n - 1)));
	return 0;
}