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;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

    }
} 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;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

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

        int n = sc.nextInt();
        int l = sc.nextInt();

        int sum = 0;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

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

        int n = sc.nextInt();
        int l = sc.nextInt();

        int sum = 0;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

    } 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 for(int i = 0; i < n; i++){
            sum += l + i;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sum += l + i;
        } {
            sum += l + i;
        } sum += l + i sum l + i l i if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        } n + l <= 0 n + l n l 0 {
            System.out.println(sum - (n + l - 1));
        } System.out.println(sum - (n + l - 1)) System.out.println System.out System System.out sum - (n + l - 1) sum (n + l - 1) n + l n l 1 if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        } l < 0 l 0 {
            System.out.println(sum);
        } System.out.println(sum) System.out.println System.out System System.out sum {
            System.out.println(sum - l);
        } System.out.println(sum - l) System.out.println System.out System System.out sum - l sum l 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;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

    }
} 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;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

    }
} 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;

        for(int i = 0; i < n; i++){
            sum += l + i;
        }

        if(n + l <= 0){
            System.out.println(sum - (n + l - 1));
        }else if(l < 0){
            System.out.println(sum);
        }else{
            System.out.println(sum - l);
        }

    }
}
