import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-min);
        
    }
} import java.util.Scanner; Scanner java.util import java.util.stream.IntStream; IntStream java.util.stream public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-min);
        
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-min);
        
    } main {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-min);
        
    } 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[] list = new int[N]; list new int[N] N int min = (int)1e5; min (int)1e5 int mid = 0; mid 0 for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        } {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        } int score = i+L; score i+L i L list[i] = score list[i] list i score if(score*score < min*min) {
                mid = i;
                min = score;
            } score*score < min*min score*score score score min*min min min {
                mid = i;
                min = score;
            } mid = i mid i min = score min score System.out.println(IntStream.of(list).sum()-min) System.out.println System.out System System.out IntStream.of(list).sum()-min IntStream.of(list).sum() IntStream.of(list).sum IntStream.of(list) IntStream.of IntStream list min 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[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-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[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-min);
        
    }
} Main
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();

        int[] list = new int[N];
        int min = (int)1e5;
        int mid = 0;
        for(int i=0; i<N; i++) {
            int score = i+L;
            list[i] = score;
            if(score*score < min*min) {
                mid = i;
                min = score;
            }
        }
        System.out.println(IntStream.of(list).sum()-min);
        
    }
}