import java.util.*;

public class Main {

    public static void main(String args[]) {

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

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

        // 出力
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

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

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

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

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

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

        // 出力
        System.out.println(result);
    } main {

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

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

        // 出力
        System.out.println(result);
    } 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 sc.close() sc.close sc int[] apple = new int[n]; apple new int[n] n for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            apple[i] = l + i;
        } {
            apple[i] = l + i;
        } apple[i] = l + i apple[i] apple i l + i l i int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        } int a apple {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        } {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        } if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            } min < 0 min 0 {
                min = Math.max(min, a);
            } min = Math.max(min, a) min Math.max(min, a) Math.max Math min a {
                min = Math.min(min, a);
            } min = Math.min(min, a) min Math.min(min, a) Math.min Math min a int sum = Arrays.stream(apple).sum(); sum Arrays.stream(apple).sum() Arrays.stream(apple).sum Arrays.stream(apple) Arrays.stream Arrays apple int result = sum - min; result sum - min sum min 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 = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

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

    public static void main(String args[]) {

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

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

        // 出力
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

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

        // 主処理
        int[] apple = new int[n];
        for (int i = 0; i < n; i++) {
            apple[i] = l + i;
        }

        int min = Integer.MAX_VALUE;
        for (int a : apple) {
            if (min < 0) {
                min = Math.max(min, a);
            } else {
                min = Math.min(min, a);
            }
        }

        int sum = Arrays.stream(apple).sum();
        int result = sum - min;

        // 出力
        System.out.println(result);
    }
}
