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 total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-min);
    }
} 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 total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-min);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-min);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-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 total = 0 total 0 min = 100; min 100 for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        } {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        } int a = l + i; a l + i l i total += a total a if (Math.abs(a) < Math.abs(min)) min = a; Math.abs(a) < Math.abs(min) Math.abs(a) Math.abs Math a Math.abs(min) Math.abs Math min min = a min a System.out.println(total-min) System.out.println System.out System System.out total-min total 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 total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-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 total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-min);
    }
} 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 total = 0, min = 100;
        for (int i = 0; i < n; i++) {
            int a = l + i;
            total += a;
            if (Math.abs(a) < Math.abs(min)) min = a;
        }
        System.out.println(total-min);
    }
}