import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        }
    }
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.BufferedOutputStream; BufferedOutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        }
    }
} Main public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        }
    } main {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        }
    } try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        } {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        } BufferedInputStream in = new BufferedInputStream(System.in) BufferedInputStream in = new BufferedInputStream(System.in) new BufferedInputStream(System.in) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) new PrintWriter(new BufferedOutputStream(System.out)) Scanner sc = new Scanner(in); sc new Scanner(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 = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < n; i++) {
                sum += l + i;
                if (Math.abs(min) > Math.abs(l + i)) min = l + i;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                sum += l + i;
                if (Math.abs(min) > Math.abs(l + i)) min = l + i;
            } {
                sum += l + i;
                if (Math.abs(min) > Math.abs(l + i)) min = l + i;
            } sum += l + i sum l + i l i if (Math.abs(min) > Math.abs(l + i)) min = l + i; Math.abs(min) > Math.abs(l + i) Math.abs(min) Math.abs Math min Math.abs(l + i) Math.abs Math l + i l i min = l + i min l + i l i out.println(sum - min) out.println out sum - min sum min String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

            out.println(sum - min);
        }
    }
} Main
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 11:32-

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

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

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