import java.util.*;
//import java.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    } 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 aji[] = new int[N+1]; aji new int[N+1] N+1 N 1 int pi_aji = 0; pi_aji 0 int i; i int min = 1000; min 1000 int min_num = 1000; min_num 1000 for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        } i = 1 ; i = 1 i 1 i < N+1 i N+1 N 1 i++ i++ i {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        } {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        } aji[i] = L+i-1 aji[i] aji i L+i-1 L+i L i 1 if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            } Math.abs(min) > Math.abs(aji[i]) Math.abs(min) Math.abs Math min Math.abs(aji[i]) Math.abs Math aji[i] aji i {
                min = aji[i];
                min_num = i;
            } min = aji[i] min aji[i] aji i min_num = i min_num i for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        } i = 1 ; i = 1 i 1 i < N+1 i N+1 N 1 i++ i++ i {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        } {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        } if (i != min_num) {
                pi_aji += aji[i];
            } i != min_num i min_num {
                pi_aji += aji[i];
            } pi_aji += aji[i] pi_aji aji[i] aji i System.out.println(pi_aji) System.out.println System.out System System.out pi_aji String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    }
} Main
import java.util.*;
//import java.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    }
}
