import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	}
} import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt() N sc.nextInt() sc.nextInt sc L = sc.nextInt(); L sc.nextInt() sc.nextInt sc Map<Integer, Integer> map = new TreeMap<>(); map new TreeMap<>() int sum = 0; sum 0 for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		} {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		} sum += L+i-1 sum L+i-1 L+i L i 1 map.put(Math.abs(L+i-1),i) map.put map Math.abs(L+i-1) Math.abs Math L+i-1 L+i L i 1 i int le = 0; le 0 for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		} Map.Entry<Integer, Integer> entry map.entrySet() map.entrySet map {
			le = entry.getValue();
			break;
		} {
			le = entry.getValue();
			break;
		} le = entry.getValue() le entry.getValue() entry.getValue entry break; sum -= L+le-1 sum L+le-1 L+le L le 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	}
} Main
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), L = sc.nextInt();
		Map<Integer, Integer> map = new TreeMap<>();
		int sum = 0;
		for(int i = 1; i <= N; i++) {
			sum += L+i-1;
			map.put(Math.abs(L+i-1),i);
		}
		int le = 0;
		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
			le = entry.getValue();
			break;
		}
		sum -= L+le-1;
		System.out.println(sum);
	}
}