import java.util.*;

public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  }
} Main public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  } main {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int L = Integer.parseInt(sc.next()); L Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] appleValue = new int[N]; appleValue new int[N] N int sum = 0; sum 0 int a = 0; a 0 int min = 9999; min 9999 for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  } {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  } int value = L + i; value L + i L i appleValue[i] = value appleValue[i] appleValue i value sum += appleValue[i] sum appleValue[i] appleValue i if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  } min > Math.abs(value) min Math.abs(value) Math.abs Math value {
			  min = Math.abs(value);
			  a = value;
		  } min = Math.abs(value) min Math.abs(value) Math.abs Math value a = value a value System.out.println(sum - a) System.out.println System.out System System.out sum - a sum a String[] args args public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  }
} public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int L = Integer.parseInt(sc.next());
	  
	  int[] appleValue = new int[N];
	  int sum = 0;
	  int a = 0;
	  int min = 9999;
	  for(int i = 0; i < N; i++) {
		  int value = L + i;
		  appleValue[i] = value;
		  sum += appleValue[i];
		  
		  if(min > Math.abs(value)) {
			  min = Math.abs(value);
			  a = value;
		  }
	  }
	  System.out.println(sum - a);
	  	  
	  
  }
}
