import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int min = l;
		int max = l+n-1;
		int ans = 0;
		for(int i = 1; i <= n; i++){
			ans+=l+i-1;
		}
		if(max < 0){
			ans-=max;
		}else if(0 < min){
			ans-=min;
		}
		System.out.print(ans);
	}
} import java.util.*; util.* java class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int min = l;
		int max = l+n-1;
		int ans = 0;
		for(int i = 1; i <= n; i++){
			ans+=l+i-1;
		}
		if(max < 0){
			ans-=max;
		}else if(0 < min){
			ans-=min;
		}
		System.out.print(ans);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int min = l;
		int max = l+n-1;
		int ans = 0;
		for(int i = 1; i <= n; i++){
			ans+=l+i-1;
		}
		if(max < 0){
			ans-=max;
		}else if(0 < min){
			ans-=min;
		}
		System.out.print(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int min = l;
		int max = l+n-1;
		int ans = 0;
		for(int i = 1; i <= n; i++){
			ans+=l+i-1;
		}
		if(max < 0){
			ans-=max;
		}else if(0 < min){
			ans-=min;
		}
		System.out.print(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int min = l; min l int max = l+n-1; max l+n-1 l+n l n 1 int ans = 0; ans 0 for(int i = 1; i <= n; i++){
			ans+=l+i-1;
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			ans+=l+i-1;
		} {
			ans+=l+i-1;
		} ans+=l+i-1 ans l+i-1 l+i l i 1 if(max < 0){
			ans-=max;
		}else if(0 < min){
			ans-=min;
		} max < 0 max 0 {
			ans-=max;
		} ans-=max ans max if(0 < min){
			ans-=min;
		} 0 < min 0 min {
			ans-=min;
		} ans-=min ans min System.out.print(ans) System.out.print System.out System System.out ans String args[] args
import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int min = l;
		int max = l+n-1;
		int ans = 0;
		for(int i = 1; i <= n; i++){
			ans+=l+i-1;
		}
		if(max < 0){
			ans-=max;
		}else if(0 < min){
			ans-=min;
		}
		System.out.print(ans);
	}
}
