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 sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	}
} 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 sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	} 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 sum = 0; sum 0 int[] azi = new int[n]; azi new int[n] n for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            azi[i] = l+i;
          
        } {
            azi[i] = l+i;
          
        } azi[i] = l+i azi[i] azi i l+i l i if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } l<0&&n+l>0||l==0 l<0&&n+l>0 l<0 l 0 n+l>0 n+l n l 0 l==0 l 0 { 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      } for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        } {
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        } sum = sum + azi[i] sum sum + azi[i] sum azi[i] azi i if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } l>0 l 0 {
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      } for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        } int i=1; int i=1; i 1 i<n i n i++ i++ i {
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        } {
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        } sum = sum + azi[i] sum sum + azi[i] sum azi[i] azi i {
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        } {
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        } sum = sum + azi[i] sum sum + azi[i] sum azi[i] azi i System.out.println(sum) System.out.println System.out System System.out sum 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 sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int l = sc.nextInt();
        int sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	}
} 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 sum = 0;
        int[] azi = new int[n];
        for(int i=0; i<n; i++){
            azi[i] = l+i;
          
        }
      
      if(l<0&&n+l>0||l==0){ 
        for(int i=0; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else if(l>0){
        for(int i=1; i<n; i++){
            sum = sum + azi[i];
//          System.out.println(azi[i]);
        }
      }else{
          for(int i=0; i<n-1; i++){
            sum = sum + azi[i];
//            System.out.println(azi[i]);
        }
      } 
        System.out.println(sum);
	}
}
