import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int l = scan.nextInt(); l scan.nextInt() scan.nextInt scan int[] taste = new int[n]; taste new int[n] n int sum = 0; sum 0 int minAbs = 10000; minAbs 10000 int eat = 0; eat 0 for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        } {
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        } taste[i] = l + i taste[i] taste i l + i l i sum += taste[i] sum taste[i] taste i if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            } minAbs > Math.abs(taste[i]) minAbs Math.abs(taste[i]) Math.abs Math taste[i] taste i {
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            } minAbs = Math.abs(taste[i]) minAbs Math.abs(taste[i]) Math.abs Math taste[i] taste i eat = taste[i] eat taste[i] taste i Arrays.sort(taste) Arrays.sort Arrays taste System.out.println(sum - eat) System.out.println System.out System System.out sum - eat sum eat scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int l = scan.nextInt();
        int[] taste = new int[n];
        int sum = 0;
        int minAbs = 10000;
        int eat = 0;
        for(int i = 0; i < n; i++){
            taste[i] = l + i;
            sum += taste[i];
            if(minAbs > Math.abs(taste[i])){
                minAbs = Math.abs(taste[i]);
                eat = taste[i];
            }
        }
        Arrays.sort(taste);
        System.out.println(sum - eat);
        scan.close();
    }
}
