import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    }
} import java.util.Scanner; Scanner 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 x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    } 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 x=0 x 0 y=0 y 0 min=999999; min 999999 for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        } {
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        } x = x+(L+i-1) x x+(L+i-1) x (L+i-1) L+i L i 1 y=L+i-1 y L+i-1 L+i L i 1 if(Math.abs(min)>Math.abs(y)){
                min = y;
            } Math.abs(min)>Math.abs(y) Math.abs(min) Math.abs Math min Math.abs(y) Math.abs Math y {
                min = y;
            } min = y min y x = x-min x x-min x min System.out.println(x) System.out.println System.out System System.out x 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 x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int x=0 , y=0 , min=999999;
        for(int i=1; i<=N; i++){
            x = x+(L+i-1);
            y=L+i-1;
            if(Math.abs(min)>Math.abs(y)){
                min = y;
            }
        }
        x = x-min;
        System.out.println(x);
    }
}