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

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	} main {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() int min = 0; min 0 int sum = 0; sum 0 for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			list.add(b);
			b++;
			sum += list.get(i);
		} {
			list.add(b);
			b++;
			sum += list.get(i);
		} list.add(b) list.add list b b++ b sum += list.get(i) sum list.get(i) list.get list i min = list.get(0) min list.get(0) list.get list 0 for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		} int i = 0; int i = 0; i 0 i < list.size() - 1 i list.size() - 1 list.size() list.size list 1 i++ i++ i {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		} {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		} if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			} Math.abs(list.get(i)) > Math.abs(list.get(i + 1)) Math.abs(list.get(i)) Math.abs Math list.get(i) list.get list i Math.abs(list.get(i + 1)) Math.abs Math list.get(i + 1) list.get list i + 1 i 1 {
				min = list.get(i + 1);
			} min = list.get(i + 1) min list.get(i + 1) list.get 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 sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	}
} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<Integer>();
		int min = 0;
		int sum = 0;
		for(int i = 0; i < a; i++) {
			list.add(b);
			b++;
			sum += list.get(i);
		}
		min = list.get(0);
		for(int i = 0; i < list.size() - 1; i++) {
			if(Math.abs(list.get(i)) > Math.abs(list.get(i + 1))) {
				min = list.get(i + 1);
			}
		}
		System.out.println(sum - min);
	}
}