import java.util.*;

public class Main{
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    }
} Main public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    } main {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int l = Integer.parseInt(sc.next()); l Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int data[] = new int[n]; data new int[n] n int sum = 0; sum 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE boolean minFlag = true; minFlag true for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        } {
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        } data[i] = l + i data[i] data i l + i l i sum += data[i] sum data[i] data i if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            } data[i] < 0 data[i] data i 0 {
                data[i] *= -1;
                minFlag = false;
            } data[i] *= -1 data[i] data i -1 1 minFlag = false minFlag false {
                minFlag = true;
            } minFlag = true minFlag true min = Math.min(min,data[i]) min Math.min(min,data[i]) Math.min Math min data[i] data i if(minFlag == false){
            min *= -1;
        } minFlag == false minFlag false {
            min *= -1;
        } min *= -1 min -1 1 System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min String[] args args public class Main{
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    }
} public class Main{
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int data[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        boolean minFlag = true;
        for(int i = 0;i<n;i++){
            data[i] = l + i;
            sum += data[i];
            if(data[i] < 0){
                data[i] *= -1;
                minFlag = false;
            }else{
                minFlag = true;
            }
            min = Math.min(min,data[i]);
        }
        if(minFlag == false){
            min *= -1;
        }
        System.out.println(sum - min);
    }
}