import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    }

    static int abs_min(int[] a){
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    }
} import java.util.*; util.* java public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    }

    static int abs_min(int[] a){
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    } 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[] apple = new int[n]; apple new int[n] n for(int i = 0; i < n; i++){
            apple[i] = l + i;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            apple[i] = l + i;
        } {
            apple[i] = l + i;
        } apple[i] = l + i apple[i] apple i l + i l i int sum = 0; sum 0 for (int i = 0; i < n; i++)
            sum += apple[i]; int i = 0; int i = 0; i 0 i < n i n i++ i++ i sum += apple[i]; sum += apple[i] sum apple[i] apple i System.out.println(sum - abs_min(apple)) System.out.println System.out System System.out sum - abs_min(apple) sum abs_min(apple) abs_min apple sc.close() sc.close sc String args[] args static int abs_min(int[] a){
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    } abs_min {
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    } int min = a[0]; min a[0] a 0 for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        } int i = 1; int i = 1; i 1 i < a.length i a.length a a.length i++ i++ i {
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        } {
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        } if (Math.abs(a[i]) < Math.abs(min))
                min = a[i]; Math.abs(a[i]) < Math.abs(min) Math.abs(a[i]) Math.abs Math a[i] a i Math.abs(min) Math.abs Math min min = a[i] min a[i] a i return min; min int[] a a public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    }

    static int abs_min(int[] a){
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    }
} public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    }

    static int abs_min(int[] a){
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    }
} Main
import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] apple = new int[n];

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

        for (int i = 0; i < n; i++)
            sum += apple[i];
        System.out.println(sum - abs_min(apple));
        sc.close();  
    }

    static int abs_min(int[] a){
        int min = a[0];
        for (int i = 1; i < a.length; i++){
            if (Math.abs(a[i]) < Math.abs(min))
                min = a[i];
        }
        return min;
    }
}