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 s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    }
} 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 s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    } 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 s = 0; s 0 for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            s = s + l + i - 1;
        } {
            s = s + l + i - 1;
        } s = s + l + i - 1 s s + l + i - 1 s + l + i s + l + i s l i 1 int a = 0; a 0 for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if(l - 1 + i == 0){
                a = i;
            }
        } {
            if(l - 1 + i == 0){
                a = i;
            }
        } if(l - 1 + i == 0){
                a = i;
            } l - 1 + i == 0 l - 1 + i l - 1 l 1 i 0 {
                a = i;
            } a = i a i if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        } a == 0 a 0 {
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        } if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            } l * l > (l + n - 1) * (l + n - 1) l * l l l (l + n - 1) * (l + n - 1) (l + n - 1) l + n l n 1 (l + n - 1) l + n l n 1 {
                a = n;
            } a = n a n {
                a = 1;
            } a = 1 a 1 System.out.println(s - l + 1 - a) System.out.println System.out System System.out s - l + 1 - a s - l + 1 s - l s l 1 a sc.close() sc.close sc 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 s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    }
} 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 s = 0;
        for(int i = 1; i <= n; i++){
            s = s + l + i - 1;
        }
        int a = 0;
        for(int i = 1; i <= n; i++){
            if(l - 1 + i == 0){
                a = i;
            }
        }
        if(a == 0){
            if(l * l > (l + n - 1) * (l + n - 1)){
                a = n;
            }else{
                a = 1;
            }
        }
        System.out.println(s - l + 1 - a);
        sc.close();
    }
}