import java.util.*;
 
public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    }
} Main public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    } main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    } 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 taste[] = new int[n]; taste new int[n] n int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int ans = 0; ans 0 for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        } {
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        } taste[i] = l + i taste[i] taste i l + i l i ans += taste[i] ans taste[i] taste i int a = Math.abs(taste[i]); a Math.abs(taste[i]) Math.abs Math taste[i] taste i min = Math.min(min, a) min Math.min(min, a) Math.min Math min a if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        } l + n - 1 < 0 l + n - 1 l + n l n 1 0 {
        	System.out.println(ans + min);
        } System.out.println(ans + min) System.out.println System.out System System.out ans + min ans min {
        	System.out.println(ans - min);
        } System.out.println(ans - min) System.out.println System.out System System.out ans - min ans min String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    }
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    }
} Main
import java.util.*;
 
public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int taste[] = new int[n];
        int min = Integer.MAX_VALUE;
        int ans = 0;
        for(int i = 0; i < n; i++){
        	taste[i] = l + i;
            ans += taste[i];
            int a = Math.abs(taste[i]);
            min = Math.min(min, a);
        }
        if(l + n - 1 < 0){
        	System.out.println(ans + min);
        }else{
        	System.out.println(ans - min);
        }
    }
}