import java.util.*;
import java.lang.*;

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

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