import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		int N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		int N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		int N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	} main {
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		int N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	} 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 int aji[] = new int[N]; aji new int[N] N int sum = 0; sum 0 int min = L; min L for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        } {
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        } aji[i-1] = L + i - 1 aji[i-1] aji i-1 i 1 L + i - 1 L + i L i 1 if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          } Math.abs(aji[i-1]) < Math.abs(min) Math.abs(aji[i-1]) Math.abs Math aji[i-1] aji i-1 i 1 Math.abs(min) Math.abs Math min {
            min = aji[i-1];
          } min = aji[i-1] min aji[i-1] aji i-1 i 1 sum = sum + aji[i-1] sum sum + aji[i-1] sum aji[i-1] aji 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 N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		int N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		int N = sc.nextInt();
      	int L = sc.nextInt();
      	int aji[] = new int[N];
      	int sum = 0;
      	int min = L;
		
      	for(int i=1;i<=N;i++){
          aji[i-1] = L + i - 1;
          if(Math.abs(aji[i-1]) < Math.abs(min)){
            min = aji[i-1];
          }
          sum = sum + aji[i-1];
        }
      System.out.println(sum-min);
	}
}