	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.List;
	import java.util.Map;
	import java.util.Map.Entry;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Scanner;
	import java.util.Set;

	public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		}
	} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.PriorityQueue; PriorityQueue java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		}
	} Main public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		} main {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] t = scanner.nextLine().split(" "); t scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int n = Integer.parseInt(t[0]); n Integer.parseInt(t[0]) Integer.parseInt Integer t[0] t 0 int l = Integer.parseInt(t[1]); l Integer.parseInt(t[1]) Integer.parseInt Integer t[1] t 1 int[] list = new int[n]; list new int[n] n int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int sum = 0; sum 0 for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			} {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			} list[i - 1] = i + l - 1 list[i - 1] list i - 1 i 1 i + l - 1 i + l i l 1 if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];} Math.abs(min) > Math.abs(list[i - 1]) Math.abs(min) Math.abs Math min Math.abs(list[i - 1]) Math.abs Math list[i - 1] list i - 1 i 1 {min = list[i - 1];} min = list[i - 1] min list[i - 1] list i - 1 i 1 sum += list[i - 1] sum list[i - 1] list i - 1 i 1 System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min String[] args args public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		}
	} public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		}
	} Main
	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.List;
	import java.util.Map;
	import java.util.Map.Entry;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Scanner;
	import java.util.Set;

	public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int l = Integer.parseInt(t[1]);

			int[] list = new int[n];

			int min = Integer.MAX_VALUE;
			int sum = 0;
			for(int i = 1; i <= n; i++) {
				list[i - 1] = i + l - 1;
				if(Math.abs(min) > Math.abs(list[i - 1])) {min = list[i - 1];}
				sum += list[i - 1];
			}

			System.out.println(sum - min);



		}
	}