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 sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    }
} 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 sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    }
} Main public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    } 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 sum=0 sum 0 opt = 999999999 opt 999999999 opt_num=0; opt_num 0 for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        } {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        } int num = L+i-1; num L+i-1 L+i L i 1 sum+=num sum num if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            } opt>Math.abs(L+i-1) opt Math.abs(L+i-1) Math.abs Math L+i-1 L+i L i 1 {
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            } opt = Math.abs(L+i-1) opt Math.abs(L+i-1) Math.abs Math L+i-1 L+i L i 1 opt_num = L+i-1 opt_num L+i-1 L+i L i 1 System.out.println(sum-opt_num) System.out.println System.out System System.out sum-opt_num sum opt_num 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 sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    }
} public class Main {
    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    }
} 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 sum=0,opt = 999999999,opt_num=0;
        for(int i=1;i<=N;i++) {
            int num = L+i-1;
            sum+=num;
            if(opt>Math.abs(L+i-1)){
                opt = Math.abs(L+i-1);
                opt_num = L+i-1;
            }
        }
        System.out.println(sum-opt_num);
    }
}
