import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	}
} Main public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	} 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[] a = new int[n+1]; a new int[n+1] n+1 n 1 a[0] = 0 a[0] a 0 0 for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			a[i] = l + i -1;
		} {
			a[i] = l + i -1;
		} a[i] = l + i -1 a[i] a i l + i -1 l + i l i 1 int sum = 0; sum 0 for(int i=1; i<=n; i++){
          sum += a[i];
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
          sum += a[i];
        } {
          sum += a[i];
        } sum += a[i] sum a[i] a i int low = Math.abs(a[1]); low Math.abs(a[1]) Math.abs Math a[1] a 1 int num = 0; num 0 int eat = 0; eat 0 for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        } {
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        } num = Math.abs(a[i]) num Math.abs(a[i]) Math.abs Math a[i] a i if(low>=num){
            low = num;
            eat = a[i];
          } low>=num low num {
            low = num;
            eat = a[i];
          } low = num low num eat = a[i] eat a[i] a i System.out.println(sum-eat) System.out.println System.out System System.out sum-eat sum eat String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int l = sc.nextInt();
		int[] a = new int[n+1];
      	a[0] = 0;
		for(int i=1; i<=n; i++){
			a[i] = l + i -1;
		}
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	int low = Math.abs(a[1]);
      	int num = 0;
      	int eat = 0;
      	for(int i=1; i<=n; i++){
          num = Math.abs(a[i]);
          if(low>=num){
            low = num;
            eat = a[i];
          }
        }
      	System.out.println(sum-eat);
	}
}
