import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	}

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

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	}

} Main public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	} main {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int L = scan.nextInt(); L scan.nextInt() scan.nextInt scan int min_abs_taste = L; min_abs_taste L int apple_pie_taste = 0; apple_pie_taste 0 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 } {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 } apple_pie_taste += L + i apple_pie_taste L + i L i if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 } Math.abs(L + i) <= Math.abs(min_abs_taste) Math.abs(L + i) Math.abs Math L + i L i Math.abs(min_abs_taste) Math.abs Math min_abs_taste {
				min_abs_taste = L + i; 
			 } min_abs_taste = L + i min_abs_taste L + i L i System.out.println(apple_pie_taste - min_abs_taste) System.out.println System.out System System.out apple_pie_taste - min_abs_taste apple_pie_taste min_abs_taste scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	}

} public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 
		 int N = scan.nextInt();
		 int L = scan.nextInt();
		 
		 int min_abs_taste = L;
		 int apple_pie_taste = 0;
		 
		 for (int i = 0; i < N; i++ ) {
			 apple_pie_taste += L + i;
			 
			 if (Math.abs(L + i) <= Math.abs(min_abs_taste)) {
				min_abs_taste = L + i; 
			 }
		 }
		
		 System.out.println(apple_pie_taste - min_abs_taste);
		 
		 scan.close();
		 
	}

}
