import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    } main {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        } sc.hasNext() sc.hasNext sc {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        } int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int L = sc.nextInt(); L sc.nextInt() sc.nextInt sc int[] flavors = new int[N]; flavors new int[N] N int sum = 0; sum 0 for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                flavors[i] = L + i;
            } {
                flavors[i] = L + i;
            } flavors[i] = L + i flavors[i] flavors i L + i L i if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            } (flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) (flavors[0] < 0 && flavors[N-1] == 0) flavors[0] < 0 flavors[0] flavors 0 0 flavors[N-1] == 0 flavors[N-1] flavors N-1 N 1 0 (flavors[0] < 0 && flavors[N-1] < 0) flavors[0] < 0 flavors[0] flavors 0 0 flavors[N-1] < 0 flavors[N-1] flavors N-1 N 1 0 {
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            } for (int i = 0; i < N - 1; i++)
                    sum += flavors[i]; int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i sum += flavors[i]; sum += flavors[i] sum flavors[i] flavors i if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            } (flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) (flavors[0] == 0 && flavors[N-1] > 0) flavors[0] == 0 flavors[0] flavors 0 0 flavors[N-1] > 0 flavors[N-1] flavors N-1 N 1 0 (flavors[0] > 0 && flavors[N-1] > 0) flavors[0] > 0 flavors[0] flavors 0 0 flavors[N-1] > 0 flavors[N-1] flavors N-1 N 1 0 {
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            } for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
                    sum += flavors[i];
                } {
                    sum += flavors[i];
                } sum += flavors[i] sum flavors[i] flavors i if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            } flavors[0] < 0 && flavors[N-1] > 0 flavors[0] < 0 flavors[0] flavors 0 0 flavors[N-1] > 0 flavors[N-1] flavors N-1 N 1 0 {
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            } for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                } {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                } if (flavors[i] == 0)
                        continue; flavors[i] == 0 flavors[i] flavors i 0 continue; sum+= flavors[i] sum flavors[i] flavors 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);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int N = sc.nextInt();
            int L = sc.nextInt();

            int[] flavors = new int[N];
            int sum = 0;

            for (int i = 0; i < N; i++) {
                flavors[i] = L + i;
            }

            if ((flavors[0] < 0 && flavors[N-1] == 0) || (flavors[0] < 0 && flavors[N-1] < 0) ){
                for (int i = 0; i < N - 1; i++)
                    sum += flavors[i];
            }else if ((flavors[0] == 0 && flavors[N-1] > 0) || (flavors[0] > 0 && flavors[N-1] > 0) ){
                for (int i = 1; i < N; i++) {
                    sum += flavors[i];
                }
            }else if (flavors[0] < 0 && flavors[N-1] > 0){
                for (int i = 0; i < N; i++) {
                    if (flavors[i] == 0)
                        continue;
                    sum+= flavors[i];
                }
            }

            System.out.println(sum);


        }


    }
}