import java.util.*;
import java.io.*;


public class Main{

    static int INFTY = Integer.MAX_VALUE;
    public static void main (String args[]){
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    }


} import java.util.*; util.* java import java.io.*; io.* java public class Main{

    static int INFTY = Integer.MAX_VALUE;
    public static void main (String args[]){
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    }


} Main static int INFTY = Integer.MAX_VALUE; INFTY Integer.MAX_VALUE Integer Integer.MAX_VALUE public static void main (String args[]){
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    } main {
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    } 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[] arr = new int[N+1]; arr new int[N+1] N+1 N 1 int minAbs=INFTY; minAbs INFTY int minNum=0; minNum 0 int ans=0; ans 0 for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        } {
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        } arr[i]=L+i-1 arr[i] arr i L+i-1 L+i L i 1 ans+=arr[i] ans arr[i] arr i if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            } minAbs>Math.abs(arr[i]) minAbs Math.abs(arr[i]) Math.abs Math arr[i] arr i {
                minAbs=Math.abs(arr[i]);
                minNum=i;
            } minAbs=Math.abs(arr[i]) minAbs Math.abs(arr[i]) Math.abs Math arr[i] arr i minNum=i minNum i ans=ans-arr[minNum] ans ans-arr[minNum] ans arr[minNum] arr minNum System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main{

    static int INFTY = Integer.MAX_VALUE;
    public static void main (String args[]){
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    }


} public class Main{

    static int INFTY = Integer.MAX_VALUE;
    public static void main (String args[]){
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    }


} Main
import java.util.*;
import java.io.*;


public class Main{

    static int INFTY = Integer.MAX_VALUE;
    public static void main (String args[]){
        //初期処理
        Scanner sc=new Scanner(System.in);
        // BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // try{
            // int n = Integer.parseInt(br.readLine());
            
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] arr = new int[N+1];
        int minAbs=INFTY;
        int minNum=0;
        int ans=0;
        for(int i=1;i<=N;i++){
            arr[i]=L+i-1;
            ans+=arr[i];
            if(minAbs>Math.abs(arr[i])){
                minAbs=Math.abs(arr[i]);
                minNum=i;
            }
        }
        ans=ans-arr[minNum];
        System.out.println(ans);

    }


}