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 sum = 0;
        int min_abs = Integer.MAX_VALUE;
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

        System.out.println(sum - min);
    }
} 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 sum = 0;
        int min_abs = Integer.MAX_VALUE;
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

        System.out.println(sum - min);
    }
} 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_abs = Integer.MAX_VALUE;
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

        System.out.println(sum - min);
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();

        int sum = 0;
        int min_abs = Integer.MAX_VALUE;
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

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

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

        System.out.println(sum - min);
    }
} 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_abs = Integer.MAX_VALUE;
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

        System.out.println(sum - min);
    }
} 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 sum = 0;
        int min_abs = Integer.MAX_VALUE;
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int tmp = l + i;
            sum += tmp;
            if (min_abs > Math.abs(tmp)) {
                min = tmp;
                min_abs = Math.abs(tmp);
            }
        }

        System.out.println(sum - min);
    }
}