import java.io.PrintWriter;
import java.util.*;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} Main static String br = System.getProperty("line.separator"); br System.getProperty("line.separator") System.getProperty System "line.separator" static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] args) {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    } main {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    } int N = nextInt(); N nextInt() nextInt int L = nextInt(); L nextInt() nextInt int sum = 0; sum 0 int min = 0; min 0 for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        } {
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        } int num = L+i-1; num L+i-1 L+i L i 1 if(i == 1) min = num; i == 1 i 1 min = num min num min = Math.abs(min) > Math.abs(num) ? num : min min Math.abs(min) > Math.abs(num) ? num : min Math.abs(min) > Math.abs(num) Math.abs(min) Math.abs Math min Math.abs(num) Math.abs Math num num min sum += num sum num println(sum - min) println sum - min sum min String[] args args static int nextInt() {
        return Integer.parseInt(next());
    } nextInt {
        return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next static Long nextLong() {
        return Long.parseLong(next());
    } nextLong {
        return Long.parseLong(next());
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next static String next() {
        return sc.next();
    } next {
        return sc.next();
    } return sc.next(); sc.next() sc.next sc static String nextLine(){
        return sc.nextLine();
    } nextLine {
        return sc.nextLine();
    } return sc.nextLine(); sc.nextLine() sc.nextLine sc static void println(Object o) {
        out.println(o);
        out.flush();
    } println {
        out.println(o);
        out.flush();
    } out.println(o) out.println out o out.flush() out.flush out Object o o static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    } print {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    } PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.print(o) out.print out o out.flush() out.flush out Object o o public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
} Main
import java.io.PrintWriter;
import java.util.*;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int N = nextInt();
        int L = nextInt();

        int sum = 0;
        int min = 0;
        for(int i=1; i<=N; i++){
            int num = L+i-1;
            if(i == 1) min = num;
            min = Math.abs(min) > Math.abs(num) ? num : min;

            sum += num;
        }

        println(sum - min);
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
}
