import java.util.*;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    }
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc num = num +1 num num +1 num 1 int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int ans = 0; ans 0 int taste[] = new int[num]; taste new int[num] num int eat; eat int eat2 = l; eat2 l if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        } l > 0 l 0 {
            eat = l;
        } eat = l eat l {
            eat = l * -1;
        } eat = l * -1 eat l * -1 l -1 1 for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        } int i = 1; int i = 1; i 1 i < num i num i++ i++ i {
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        } {
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        } taste[i] = l + i - 1 taste[i] taste i l + i - 1 l + i l i 1 ans = ans + taste[i] ans ans + taste[i] ans taste[i] taste i if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            } taste[i] < 0 taste[i] taste i 0 {
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            } taste[i] = taste[i]* -1 taste[i] taste i taste[i]* -1 taste[i] taste i -1 1 if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                } taste[i] < eat taste[i] taste i eat {
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                } eat = taste[i] eat taste[i] taste i eat2 = taste[i]*-1 eat2 taste[i]*-1 taste[i] taste i -1 1 {
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            } if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                } taste[i] < eat taste[i] taste i eat {
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                } eat = taste[i] eat taste[i] taste i eat2 = taste[i] eat2 taste[i] taste i ans = ans - eat2 ans ans - eat2 ans eat2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    }
} Main
import java.util.*;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        num = num +1;
        int l = sc.nextInt();
        int ans = 0;
        int taste[] = new int[num];
        int eat;
        int eat2 = l;
        if(l > 0){
            eat = l;
        }else{
            eat = l * -1;
        }
         for(int i = 1; i < num; i++){
            taste[i] = l + i - 1;
            ans = ans + taste[i];
            if(taste[i] < 0){
                taste[i] = taste[i]* -1;
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i]*-1;
                    //System.out.println(eat2);
                }
            }else{
                if(taste[i] < eat){
                    eat = taste[i];
                    eat2 = taste[i];
                    //System.out.println(eat2);
                }
            }
        }
        ans = ans - eat2;
        System.out.println(ans);
    }
}