import java.util.Scanner;

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

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum = N*L + N*(N-1)/2;
        int abs = 39901;
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (abs > Math.abs(L+i)) {
                result = sum - L - i;
                abs = Math.abs(L+i);
            }
        }
        System.out.println(result);
    }
}