import java.util.*;

import java.lang.*;
import java.io.*;

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+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* 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+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    }
} 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+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int apple[] = new int[N+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    } 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+1]; apple new int[N+1] N+1 N 1 int sub = 0; sub 0 int min = 1000; min 1000 int c = 0; c 0 int pie = 0; pie 0 for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        } int i = 1; int i = 1; i 1 i<=N i N i++ i++ i {
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        } {
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        } apple[i] = L + i - 1 apple[i] apple i L + i - 1 L + i L i 1 if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            } apple[i] < 0 apple[i] apple i 0 {
                sub = -apple[i];
            } sub = -apple[i] sub -apple[i] apple[i] apple i {
                sub = apple[i];
            } sub = apple[i] sub apple[i] apple i if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            } sub <= min sub min {
                min = sub;
                c = i;
                //System.out.println(c);
            } min = sub min sub c = i c i for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        } int i = 0; int i = 0; i 0 i<=N i N i++ i++ i {
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        } {
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        } if(i != c){
                pie += apple[i];
            } i != c i c {
                pie += apple[i];
            } pie += apple[i] pie apple[i] apple i System.out.println(pie) System.out.println System.out System System.out pie String[] args args 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+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    }
} 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+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    }
} Main
import java.util.*;

import java.lang.*;
import java.io.*;

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+1];
        int sub = 0;
        int min = 1000;
        int c = 0;
        int pie = 0;


        for (int i = 1; i<=N; i++){
            apple[i] = L + i - 1;
            
            if(apple[i] < 0){
                sub = -apple[i];
            }else{
                sub = apple[i];
            }

            if(sub <= min){
                min = sub;
                c = i;
                //System.out.println(c);
            }
            //System.out.println(min);
        }   

        for (int i = 0; i<=N; i++){
            if(i != c){
                pie += apple[i];
            }
            //System.out.println(pie);
        }

        System.out.println(pie);
        
    }
}