import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	} 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[] arr = new int[n]; arr new int[n] n int num = 0; num 0 for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			arr[i]=l+i;
			num+= arr[i];
		} {
			arr[i]=l+i;
			num+= arr[i];
		} arr[i]=l+i arr[i] arr i l+i l i num+= arr[i] num arr[i] arr i int temp = arr[0]; temp arr[0] arr 0 int close = temp; close temp Arrays.sort(arr) Arrays.sort Arrays arr for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		} int i = 1; int i = 1; i 1 i<n i n i++ i++ i {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		} {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		} if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			} temp<0&&arr[i]>temp temp<0 temp 0 arr[i]>temp arr[i] arr i temp {
				temp = arr[i];
				close = temp;
			} temp = arr[i] temp arr[i] arr i close = temp close temp if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			} arr[i]==0 arr[i] arr i 0 {
				close = 0;
				break;
			} close = 0 close 0 break; if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			} temp>0&&arr[i]>temp temp>0 temp 0 arr[i]>temp arr[i] arr i temp {
				close = temp;
				break;
			} close = temp close temp break; System.out.println(num-close) System.out.println System.out System System.out num-close num close 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[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int[] arr = new int[n];
		int num = 0;
		for(int i = 0;i<n;i++) {
			arr[i]=l+i;
			num+= arr[i];
		}
		int temp = arr[0];
		//System.out.println(temp);
		int close = temp;
		Arrays.sort(arr);
		for(int i = 1;i<n;i++) {
			if(temp<0&&arr[i]>temp) {
				temp = arr[i];
				close = temp;
			}else if(arr[i]==0) {
				close = 0;
				break;
			}else if(temp>0&&arr[i]>temp) {
				close = temp;
				break;
			}
		}
		System.out.println(num-close);

	}

}
