import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();

        int[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner 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[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();

        int[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    } main {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();

        int[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    } 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[] taste = new int[n]; taste new int[n] n int[] min = {-1, 300}; min {-1, 300} -1 1 300 for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        } {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        } taste[i] = i + l taste[i] taste i i + l i l if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            } min[1] >= Math.abs(taste[i]) min[1] min 1 Math.abs(taste[i]) Math.abs Math taste[i] taste i {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            } min[0] = i min[0] min 0 i min[1] = Math.abs(taste[i]) min[1] min 1 Math.abs(taste[i]) Math.abs Math taste[i] taste i int result = 0; result 0 for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (i != min[0]) {
                result += taste[i];
            }
        } {
            if (i != min[0]) {
                result += taste[i];
            }
        } if (i != min[0]) {
                result += taste[i];
            } i != min[0] i min[0] min 0 {
                result += taste[i];
            } result += taste[i] result taste[i] taste i System.out.println(result) System.out.println System.out System System.out result 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[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();

        int[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();

        int[] taste = new int[n];
        int[] min = {-1, 300};
        for (int i = 0; i < n; i++) {
            taste[i] = i + l;
            if (min[1] >= Math.abs(taste[i])) {
                min[0] = i;
                min[1] = Math.abs(taste[i]);
            }
        }
        int result = 0;
        for (int i = 0; i < n; i++) {
            if (i != min[0]) {
                result += taste[i];
            }
        }

        System.out.println(result);
    }
}
