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[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	}
} 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[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	}
} Main public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);

      int n = sc.nextInt();
      int l = sc.nextInt();
      
      int[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	} main {
	  Scanner sc = new Scanner(System.in);

      int n = sc.nextInt();
      int l = sc.nextInt();
      
      int[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	} 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]; a new int[n] n int sum = 0; sum 0 int min = 400; min 400 int b = 0; b 0 for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      } {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      } a[i] = l a[i] a i l sum+= l sum l if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        } min > Math.abs(a[i]) min Math.abs(a[i]) Math.abs Math a[i] a i {
          min = Math.abs(a[i]);
          b = a[i];
        } min = Math.abs(a[i]) min Math.abs(a[i]) Math.abs Math a[i] a i b = a[i] b a[i] a i l++ l System.out.println(sum - b) System.out.println System.out System System.out sum - b sum b 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[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	}
} public class Main {
	public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);

      int n = sc.nextInt();
      int l = sc.nextInt();
      
      int[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	}
} 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[] a = new int[n];
      
      int sum = 0;
      int min = 400;
      int b = 0;
      for(int i = 0; i < n; i++) {
        a[i] = l;
        sum+= l;
        if(min > Math.abs(a[i])) {
          min = Math.abs(a[i]);
          b = a[i];
        }
        l++;
      }
      
           System.out.println(sum - b);
           
           
      
           

      
	}
}