import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    }
} Main public static void main(String[] args) {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    } main {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    } int check = 999999; check 999999 int sum = 0; sum 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int l = Integer.parseInt(sc.next()); l Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        } int i = 0 ; int i = 0 ; i 0 i < n i n i ++ i ++ i {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        } {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        } if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            } Math.abs(l + i) < Math.abs(check) Math.abs(l + i) Math.abs Math l + i l i Math.abs(check) Math.abs Math check {
                check = l + i;
            } check = l + i check l + i l i sum += l + i sum l + i l i sum -= check sum check System.out.print(sum) System.out.print System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    }
} public class Main {
    public static void main(String[] args) {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        int check = 999999;
        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());

        for (int i = 0 ; i < n ; i ++) {
            if (Math.abs(l + i) < Math.abs(check)) {
                check = l + i;
            }
            sum += l + i;
        }
        sum -= check;
        System.out.print(sum);

    }
}
