import java.util.*;
import java.lang.Math;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(ans);
	}
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(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 ans = (2*l+n-1)*n/2; ans (2*l+n-1)*n/2 (2*l+n-1)*n (2*l+n-1) 2*l+n 2*l 2 l n 1 n 2 int e; e if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1; l*(l+n-1) <= 0 l*(l+n-1) l (l+n-1) l+n l n 1 0 e = 0 e 0 if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1; Math.abs(l) < Math.abs(l+n-1) Math.abs(l) Math.abs Math l Math.abs(l+n-1) Math.abs Math l+n-1 l+n l n 1 e = l e l e = l+n-1 e l+n-1 l+n l n 1 ans -= e ans e System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(ans);
	}
} Main
import java.util.*;
import java.lang.Math;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
      	int n = sc.nextInt();
      	int l = sc.nextInt();
      	int ans = (2*l+n-1)*n/2;
      	int e;
      
      	if(l*(l+n-1) <= 0) e = 0;
      	else if(Math.abs(l) < Math.abs(l+n-1)) e = l;
      	else e = l+n-1;
      
      	ans -= e;
      	System.out.println(ans);
	}
}