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;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        }
        System.out.println(sum - min);
        sc.close();

    }

} 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;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        }
        System.out.println(sum - min);
        sc.close();

    }

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

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        }
        System.out.println(sum - min);
        sc.close();

    } 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 for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        } {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        } sum += l + i sum l + i l i if(Math.abs(l + i) < Math.abs(min)) min = l + i; Math.abs(l + i) < Math.abs(min) Math.abs(l + i) Math.abs Math l + i l i Math.abs(min) Math.abs Math min min = l + i min l + i l i System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min sc.close() sc.close sc 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;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        }
        System.out.println(sum - min);
        sc.close();

    }

} 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;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        }
        System.out.println(sum - min);
        sc.close();

    }

} 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;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            sum += l + i;
            if(Math.abs(l + i) < Math.abs(min)) min = l + i;
        }
        System.out.println(sum - min);
        sc.close();

    }

}
