import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    }
} 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(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int sum = 0 sum 0 f = Integer.MAX_VALUE; f Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        } {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        } int v = l + i; v l + i l i sum += v sum v if (Math.abs(v) < Math.abs(f)) f = v; Math.abs(v) < Math.abs(f) Math.abs(v) Math.abs Math v Math.abs(f) Math.abs Math f f = v f v System.out.println(sum - f) System.out.println System.out System System.out sum - f sum f String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), l = sc.nextInt();
        int sum = 0, f = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int v = l + i;
            sum += v;
            if (Math.abs(v) < Math.abs(f)) f = v;
        }
        System.out.println(sum - f);
    }
}