import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.List;

public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    }

}
 import java.awt.*; awt.* java import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java import java.util.List; List java.util public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    }

} Main public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    } main {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    } 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 min=Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int ind=0; ind 0 for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        } {
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        } sum+=(l+i-1) sum (l+i-1) l+i l i 1 if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            } Math.abs(l+i-1)<min Math.abs(l+i-1) Math.abs Math l+i-1 l+i l i 1 min {
                min=Math.abs(l+i-1);
                ind=i;
            } min=Math.abs(l+i-1) min Math.abs(l+i-1) Math.abs Math l+i-1 l+i l i 1 ind=i ind i System.out.println(sum-(l+ind-1)) System.out.println System.out System System.out sum-(l+ind-1) sum (l+ind-1) l+ind l ind 1 String args[] args public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    }

} public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    }

} Main
import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.List;

public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int l=sc.nextInt();
        int sum=0;
        int min=Integer.MAX_VALUE;
        int ind=0;
        for (int i=1;i<=n;i++){
            sum+=(l+i-1);
            if (Math.abs(l+i-1)<min){
                min=Math.abs(l+i-1);
                ind=i;
            }
        }
        System.out.println(sum-(l+ind-1));
    }

}

