import java.util.*;

public class Main {

    public static void main(String[] args) {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    }
} Main public static void main(String[] args) {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    } main {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    } int n n l; l Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc l = sc.nextInt() l sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            ans += l + i - 1;
        } {
            ans += l + i - 1;
        } ans += l + i - 1 ans l + i - 1 l + i l i 1 if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        } l >= 0 l 0 {
            ans -= l;
        } ans -= l ans l if (l + n - 1 <= 0){
            ans -= l + n - 1;
        } l + n - 1 <= 0 l + n - 1 l + n l n 1 0 {
            ans -= l + n - 1;
        } ans -= l + n - 1 ans l + n - 1 l + n l n 1 System.out.println(ans) System.out.println System.out System System.out ans return; String[] args args public class Main {

    public static void main(String[] args) {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    }
} public class Main {

    public static void main(String[] args) {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {

        int n, l;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        l = sc.nextInt();

        int ans = 0;
        for (int i = 1; i <= n; i++) {
            ans += l + i - 1;
        }

        if(l >= 0){
            ans -= l;
        } else if (l + n - 1 <= 0){
            ans -= l + n - 1;
        }
        System.out.println(ans);
        return;
    }
}
