import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[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, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[i];
            }
        }
        System.out.println(sum);
        
        
    }
} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[i];
            }
        }
        System.out.println(sum);
        
        
    } main {
        Scanner sc = new Scanner(System.in);
        int n, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[i];
            }
        }
        System.out.println(sum);
        
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n n l; l n = sc.nextInt() n sc.nextInt() sc.nextInt sc l = sc.nextInt() l sc.nextInt() sc.nextInt sc int[] aji = new int[n]; aji new int[n] n int minIndex = 0; minIndex 0 for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        } {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        } aji[i] = l+i aji[i] aji i l+i l i if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            } i > 0 i 0 {
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            } if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                } Math.abs(aji[i]) < Math.abs(aji[minIndex]) Math.abs(aji[i]) Math.abs Math aji[i] aji i Math.abs(aji[minIndex]) Math.abs Math aji[minIndex] aji minIndex {
                    minIndex = i;
                } minIndex = i minIndex i int sum = 0; sum 0 for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[i];
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            if(i != minIndex)
            {
                sum += aji[i];
            }
        } {
            if(i != minIndex)
            {
                sum += aji[i];
            }
        } if(i != minIndex)
            {
                sum += aji[i];
            } i != minIndex i minIndex {
                sum += aji[i];
            } sum += aji[i] sum aji[i] aji 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, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[i];
            }
        }
        System.out.println(sum);
        
        
    }
} public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[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, l;
        n = sc.nextInt();
        l = sc.nextInt();
       
        int[] aji = new int[n];
        int minIndex = 0;
        for(int i=0; i<n;i++)
        {
            aji[i] = l+i;
            if(i > 0){
                if(Math.abs(aji[i]) < Math.abs(aji[minIndex]))
                {
                    minIndex = i;
                }
            }
        }

        int sum = 0;
        for(int i=0; i<n;i++){
            if(i != minIndex)
            {
                sum += aji[i];
            }
        }
        System.out.println(sum);
        
        
    }
}

