import 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[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int l = scan.nextInt();
      	int[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    }
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int l = scan.nextInt();
      	int[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    } main {
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int l = scan.nextInt();
      	int[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    } 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[] arr = new int[n]; arr new int[n] n int sum = 0; sum 0 int min = 0; min 0 for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
        	arr[i] = l + i ;
          	sum += arr[i];
        } {
        	arr[i] = l + i ;
          	sum += arr[i];
        } arr[i] = l + i arr[i] arr i l + i l i sum += arr[i] sum arr[i] arr i if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      } l >= 0 l 0 {
        System.out.print(sum - l);
      } System.out.print(sum - l) System.out.print System.out System System.out sum - l sum l {
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      } if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        } n + l > 0 n + l n l 0 {
      		min = sum;
      		
        } min = sum min sum {
        	min = sum - (n + l - 1);
        } min = sum - (n + l - 1) min sum - (n + l - 1) sum (n + l - 1) n + l n l 1 System.out.print(min) System.out.print System.out System System.out min 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[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    }
} public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int l = scan.nextInt();
      	int[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    }
} Main
import 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[] arr = new int[n];
      	int sum = 0;
      	int min = 0;
      	for(int i = 0; i<n; i++){
        	arr[i] = l + i ;
          	sum += arr[i];
        }
      if(l >= 0){
        System.out.print(sum - l);
      }
     
      else{
        if(n + l > 0){
      		min = sum;
      		
        }
        else{
        	min = sum - (n + l - 1);
        }
        System.out.print(min);
      }
      	
    }
}