import java.util.Scanner;

public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

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

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

    }
    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
} Main private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

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

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

    } 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 min = 0; min 0 int prevTaste = 0; prevTaste 0 int sum = 0; sum 0 for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        } {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        } int taste = L + (i + 1) - 1; taste L + (i + 1) - 1 L + (i + 1) L (i + 1) i 1 1 sum += taste sum taste if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            } i == 0 i 0 {
                min = L;
            } min = L min L {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            } if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                } Math.abs(taste) < Math.abs(prevTaste) Math.abs(taste) Math.abs Math taste Math.abs(prevTaste) Math.abs Math prevTaste {
                    min = taste;
                } min = taste min taste prevTaste = taste prevTaste taste System.out.print(sum - min) System.out.print System.out System System.out sum - min sum min // Main
    public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

    }
    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
} public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

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

public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int min = 0;
        int prevTaste = 0;
        int sum = 0;
        for (int i = 0; i < N; i++) {
            int taste = L + (i + 1) - 1;
            sum += taste;

            // 初回
            if (i == 0) {
                min = L;
            }
            // 2回目以降
            else {
                if (Math.abs(taste) < Math.abs(prevTaste)) {
                    min = taste;
                }
            }

            prevTaste = taste;
        }
        System.out.print(sum - min);

    }
    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
}
