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];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            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[] taste = new int[n];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            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[] taste = new int[n];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            System.out.println(sum + min);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();

        int[] taste = new int[n];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            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[] taste = new int[n]; taste new int[n] n for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            taste[i - 1] = l + i - 1;
        } {
            taste[i - 1] = l + i - 1;
        } taste[i - 1] = l + i - 1 taste[i - 1] taste i - 1 i 1 l + i - 1 l + i l i 1 int min = 105; min 105 int sum = 0; sum 0 for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        } {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        } min = Math.min(Math.abs(taste[i]), min) min Math.min(Math.abs(taste[i]), min) Math.min Math Math.abs(taste[i]) Math.abs Math taste[i] taste i min sum += taste[i] sum taste[i] taste i if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            System.out.println(sum + min);
        } sum > 0 sum 0 {
            System.out.println(sum - min);
        } System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            System.out.println(sum + min);
        } 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[] taste = new int[n];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            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[] taste = new int[n];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            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[] taste = new int[n];
        for (int i = 1; i <= n; i++) {
            taste[i - 1] = l + i - 1;
        }

        int min = 105;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            min = Math.min(Math.abs(taste[i]), min);
            sum += taste[i];
        }

        if (sum > 0) {
            System.out.println(sum - min);
        } else {
            // 0の場合は均等なので最小値も0で加算しても変わらない
            System.out.println(sum + min);
        }
    }
}
