import java.util.*;

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];
        int ans = 0;
        int eat = 0;
        int min = 1000000000;

        for(int i = 0;i < n;i++){
            taste[i] = l+i;
            ans += taste[i];
        }

        for(int i = 0;i < n;i++){
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        }

        System.out.println(ans-taste[eat]);
    }
} import java.util.*; util.* java 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];
        int ans = 0;
        int eat = 0;
        int min = 1000000000;

        for(int i = 0;i < n;i++){
            taste[i] = l+i;
            ans += taste[i];
        }

        for(int i = 0;i < n;i++){
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        }

        System.out.println(ans-taste[eat]);
    }
} 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];
        int ans = 0;
        int eat = 0;
        int min = 1000000000;

        for(int i = 0;i < n;i++){
            taste[i] = l+i;
            ans += taste[i];
        }

        for(int i = 0;i < n;i++){
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        }

        System.out.println(ans-taste[eat]);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] taste = new int[n];
        int ans = 0;
        int eat = 0;
        int min = 1000000000;

        for(int i = 0;i < n;i++){
            taste[i] = l+i;
            ans += taste[i];
        }

        for(int i = 0;i < n;i++){
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        }

        System.out.println(ans-taste[eat]);
    } 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 int ans = 0; ans 0 int eat = 0; eat 0 int min = 1000000000; min 1000000000 for(int i = 0;i < n;i++){
            taste[i] = l+i;
            ans += taste[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            taste[i] = l+i;
            ans += taste[i];
        } {
            taste[i] = l+i;
            ans += taste[i];
        } taste[i] = l+i taste[i] taste i l+i l i ans += taste[i] ans taste[i] taste i for(int i = 0;i < n;i++){
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        } {
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        } int tmp = Math.abs(taste[i]); tmp Math.abs(taste[i]) Math.abs Math taste[i] taste i if(tmp < min){
                min = tmp;
                eat = i;
            } tmp < min tmp min {
                min = tmp;
                eat = i;
            } min = tmp min tmp eat = i eat i System.out.println(ans-taste[eat]) System.out.println System.out System System.out ans-taste[eat] ans taste[eat] taste eat String[] args args
import java.util.*;

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];
        int ans = 0;
        int eat = 0;
        int min = 1000000000;

        for(int i = 0;i < n;i++){
            taste[i] = l+i;
            ans += taste[i];
        }

        for(int i = 0;i < n;i++){
            int tmp = Math.abs(taste[i]);
            if(tmp < min){
                min = tmp;
                eat = i;
            }
        }

        System.out.println(ans-taste[eat]);
    }
}