import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	} main {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int l = s.nextInt(); l s.nextInt() s.nextInt s int array[] = new int[n]; array new int[n] n int sum = 0; sum 0 for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		} int a = 0; int a = 0; a 0 a < array.length a array.length array array.length a++ a++ a {
			array[a] = a + l;
			sum += a + l;
		} {
			array[a] = a + l;
			sum += a + l;
		} array[a] = a + l array[a] array a a + l a l sum += a + l sum a + l a l int min = 999 min 999 j = -1; j -1 1 for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		} int a = 0; int a = 0; a 0 a < array.length a array.length array array.length a++ a++ a {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		} {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		} if (min > array[a])j = a; min > array[a] min array[a] array a j = a j a min = Math.min(min, Math.abs(array[a])) min Math.min(min, Math.abs(array[a])) Math.min Math min Math.abs(array[a]) Math.abs Math array[a] array a System.out.println(sum - array[j]) System.out.println System.out System System.out sum - array[j] sum array[j] array j String[] args args public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int l = s.nextInt();
		int array[] = new int[n];
		int sum = 0;
		for (int a = 0; a < array.length; a++) {
			array[a] = a + l;
			sum += a + l;
		}
		int min = 999, j = -1;
		for (int a = 0; a < array.length; a++) {
			if (min > array[a])j = a;
			min = Math.min(min, Math.abs(array[a]));
		}
		System.out.println(sum - array[j]);
	}
}
