
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(l);
			l++;
		}
		
		int min = Integer.MAX_VALUE;
		int index = 0;
		for (int i = 0; i < list.size(); i++) {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		}
		
		list.remove(index);
		int sum = 0;
		for (Integer integer : list) {
			sum += integer;
		}
		
		System.out.println(sum);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(l);
			l++;
		}
		
		int min = Integer.MAX_VALUE;
		int index = 0;
		for (int i = 0; i < list.size(); i++) {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		}
		
		list.remove(index);
		int sum = 0;
		for (Integer integer : list) {
			sum += integer;
		}
		
		System.out.println(sum);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(l);
			l++;
		}
		
		int min = Integer.MAX_VALUE;
		int index = 0;
		for (int i = 0; i < list.size(); i++) {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		}
		
		list.remove(index);
		int sum = 0;
		for (Integer integer : list) {
			sum += integer;
		}
		
		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(l);
			l++;
		}
		
		int min = Integer.MAX_VALUE;
		int index = 0;
		for (int i = 0; i < list.size(); i++) {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		}
		
		list.remove(index);
		int sum = 0;
		for (Integer integer : list) {
			sum += integer;
		}
		
		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 int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<>(); list new ArrayList<>() for (int i = 0; i < n; i++) {
			list.add(l);
			l++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			list.add(l);
			l++;
		} {
			list.add(l);
			l++;
		} list.add(l) list.add list l l++ l int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int index = 0; index 0 for (int i = 0; i < list.size(); i++) {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		} int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		} {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		} if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			} min > Math.abs(list.get(i)) min Math.abs(list.get(i)) Math.abs Math list.get(i) list.get list i {
				min = Math.abs(list.get(i));
				index = i;
			} min = Math.abs(list.get(i)) min Math.abs(list.get(i)) Math.abs Math list.get(i) list.get list i index = i index i list.remove(index) list.remove list index int sum = 0; sum 0 for (Integer integer : list) {
			sum += integer;
		} Integer integer list {
			sum += integer;
		} {
			sum += integer;
		} sum += integer sum integer System.out.println(sum) System.out.println System.out System System.out sum String args[] args

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(l);
			l++;
		}
		
		int min = Integer.MAX_VALUE;
		int index = 0;
		for (int i = 0; i < list.size(); i++) {
			if (min > Math.abs(list.get(i))) {
				min = Math.abs(list.get(i));
				index = i;
			}
		}
		
		list.remove(index);
		int sum = 0;
		for (Integer integer : list) {
			sum += integer;
		}
		
		System.out.println(sum);
	}
}